GXC Posted January 2, 2005 Report Share Posted January 2, 2005 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 More sharing options...
bubu Posted January 2, 2005 Report Share Posted January 2, 2005 Pseidokods: if (nav vēl ierakstīta IP adrese $REMOTE_ADDR failā) { // te tavs rakstīšanas kods } Link to comment Share on other sites More sharing options...
Recommended Posts