1
0
www.mikescher.com/www/commands/server_setselfaddress.php

15 lines
361 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('ipguard add "' . $ip . '"');
echo 'Ok.';