log IP with php
<p>I found this script online:</p>

<pre><code>&lt;?php

$v_ip = $REMOTE_ADDR;
$v_date = date("l d F H:i:s");

$fp = fopen("ips.txt", "a");
fputs($fp, "IP: $v_ip - DATE: $v_date\n\n");
fclose($fp);

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

<p>Creating the entry works. However, the IP is not displayed. The entries created look like this:</p>

<pre><code>IP:  - DATE: Wednesday 09 March 03:36:15

IP:  - DATE: Wednesday 09 March 03:36:41
</code></pre>

<p>What's the problem?</p>
