|
Hi folks,
Ubuntu-6.06.1-LAMP-server-amd64
I download
Linux Dynamic DNS Update Script written by Don Jobes (April 10th, 2002)
the .php script but can't get it to work.
On terminal/console
# php /usr/local/bin/update.php[code]
Warning: file() expects parameter 2 to be long, string given in /usr/local/bin/update.php on line 183
Warning: Invalid argument supplied for foreach() in /usr/local/bin/update.php on line 184
[/code]
Line 183 and 184 are;
# cat /usr/local/bin/update.php[code]
....
if (file_exists($IPlogfile)){
$file=file(\"$IPlogfile\",\"r\"); (line 183)
foreach($file as $line){ (line 184)
list($Lastip,$blank) = split(\"\\:\",chop($line));
if($Lastip != $REMOTE_ADDR){
header(\"location: $UPDATEURL\");
$createFile = fopen(\"$IPlogfile\", \"w\");
fwrite($createFile,\"$REMOTE_ADDR:\\r\\n\");
fclose($createFile);
....
[/code]
[code]
///////////////////////////////////////////////////////////////////////////////$////////////////////////////////<-------- EDIT USER VARIABLES HERE --------> //$///////////////////////////////////////////////////////////////////////////////$
$Bypass = \"0\";
$username = \"satimis\";
$password = \"msliu20h\";
$Adminemail = \"satimis@satimis.freeddns.com\";
$Sendmail = \"/usr/sbin/sendmail -t -i\";
$IPlogfile = \"/var/log/updatedns/updatednsIP.log\";
$Logfile = \"/var/log/updatedns/updatedns.log\";
$Log1 = \"1\";
$Email1 = 1;
$Log2 = \"1\";
$Email2 = 1;
$Log3 = \"1\";
$Email3 = \"1\";
///////////////////////////////////////
....
[/code]
Please help. TIA
B.R.
satimis
|