PHP not writing client IP to file
<p>I cant figure out why it wont write the client IP address to the file, everything else works.</p>

<pre><code>&lt;?php 
$myFile = "ips.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
fwrite($fh, $_SERVER['REMOTE_HOST']);
fclose($fh);
echo $_SERVER['REMOTE_ADDR'];


?&gt;
</code></pre>

<p>Thanks in advance.</p>
