Jump to content
php.lv forumi

IP Log uzlabošana


GXC

Recommended Posts

Kā lai uzlabo šādu php kodu lai ja tāda IP adrese jau eksistē lai tas ne-log'otu velreiz?

 

<?php
$file = fopen("index.php", "a");

$time = date("dS F[H:i]");
fwrite($file,  "$time" );

if( $REMOTE_ADDR  != null)
{
 fwrite($file," - <b>$REMOTE_ADDR</b> - $HTTP_USER_AGENT
 <br>
");
}

if( $HTTP_REFERER  != null)
{
 fwrite($file,"");
}

fwrite($file,"");

fclose($file)

?>

 

Paldies

Link to comment
Share on other sites

×
×
  • Create New...