# Php code help

**URL:** <https://www.phphelp.com/t/php-code-help/20021>\
**Category:** PHP Installation and Configuration\
**Created:** [April 9, 2013, 12:40pm UTC](https://www.phphelp.com/t/php-code-help/20021 "2013-04-09T12:40:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadaaaraj](https://www.phphelp.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@nadaaaraj](https://www.phphelp.com/u/nadaaaraj)\
**Post date:** [April 9, 2013, 12:40pm UTC](https://www.phphelp.com/t/php-code-help/20021/1 "2013-04-09T12:40:44Z")

</div>

😉 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
