- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
<?php
$ip=$_SERVER[REMOTE_ADDR];
if ($_GET['hash']="ae2b1fca515949e5d54fb22b8ed95575") {
file_put_contents("deviceupdate.log","DATE: ".date("Y-m-d H:i:s")." IP: ".$ip."\n",FILE_APPEND | LOCK_EX);
file_put_contents("homeip.log",$ip,LOCK_EX);
print "DATE: ".date("Y-m-d H:i:s")." IP: ".$ip;
}
?>
http://wiki.mikrotik.com/wiki/Dynamic_DNS_on_private_DNS_server_(Route r_OS,_Bind,_Apache,_and_Shell_script)
> Web server reads the IP from the router and if the hash is ok, it writes the IP into two files in the same folder
> if the hash is ok
Ок.
inkanus-gray 16.06.2016 17:00 # 0
Мистер Хэнки 16.06.2016 17:35 # +4
guest 17.06.2016 20:27 # 0
guest 17.06.2016 20:28 # 0