Php code help

:wink: Hi, I created a php code to record the visitors ip address to my website. But that also record my ip address. Could some one help me how to avoid recording my own ip address.

Please see below the code I created
[php][/php]

<?php $filename = "file.txt"; $handle = fopen($filename, "a"); date_default_timezone_set('Europe/London'); $content = "[" . date( 'F j, Y, g:i a' ) . "] " . "] " . $_SERVER['REMOTE_ADDR']; fwrite($handle, $content . "\n"); fwrite($handle, $_SERVER['HTTP_REFERER'] . "\n"); fclose($handle); $fp = fopen('file.txt', 'a+'); fputs($fp, $formfield_1."\n".$formfield_2."\n"); fclose($fp); // Rest of code ?>

Could some one help me with that. Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service