script na logovanie IP pristupujucich ludi na web-vyriesene
Napsal: úte 6. čer 2006, 07:11
chcel by som vas poprosit ci by ste mi nevedeli poradit prave so scriptom s touto funkciou???
malo by to byt na ic.cz ale napise toto
mal som aj dalsie napr toto
ale to napisalo toto
prosim poradte mi co je zle
malo by to byt na ic.cz
Kód: Vybrat vše
<?php
$log=fopen("log1.html","a");
if( !$log ) {
or die("couldnt open log");
} else {
fwrite($log, "Date of visit " .date('l dS \of F Y h:i:s A') . ", IP:" . $REMOTE_ADDR .
"<br>");
fclose($log);
}
?>Kód: Vybrat vše
Parse error: parse error, unexpected T_LOGICAL_OR in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 4Kód: Vybrat vše
<?php
$logfile= '/full_path_to/log.html';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
?>Kód: Vybrat vše
Warning: fopen() [function.fopen.php]: open_basedir restriction in effect. File(/full_path_to/log.html) is not within the allowed path(s): (/home/ic/:/home/free/:/disk1/home/ic/:/disk1/home/free/:/tmp:/home/yousers/:/usr/share/php/:/usr/share/fpdf/:/usr/share/fonts/:/usr/share/php/jpgraph/:/usr/share/php/) in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 5
Warning: fopen(/full_path_to/log.html) [function.fopen.php]: failed to open stream: Operation not permitted in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 5
Warning: fwrite(): supplied argument is not a valid stream resource in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 6
Warning: fwrite(): supplied argument is not a valid stream resource in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 7
Warning: fclose(): supplied argument is not a valid stream resource in /home/free/ic.cz/l/laboratorium/root/www/php/ip.php on line 8