1
0
www.mikescher.com/www/commands/server_setselfaddress.php
2020-01-16 13:21:14 +01:00

15 lines
364 B
PHP

<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
$ip = get_client_ip();
file_put_contents(__DIR__ . '/../dynamic/self_ip_address.auto.cfg', $ip);
system('add-trusted-ip "' . $ip . '"');
echo 'Ok.';