Get IP of Visitor, then name a .txt file after the visitor?
<p>I'm trying to create a system that will get the visitors IP, include some information, and then save that information in a .txt file with the file name of like... 10.0.0.1.txt.</p>

<p>I'm having some issues with it.</p>

<p>Here's some of the code:</p>

<pre><code>$logfile = fopen($client_IP, 'a+');
fwrite($logfile, "\n".$_GET['c']);
fclose($logfile);
</code></pre>

<p>$client_IP is basically : </p>

<pre><code>    $client_IP = $_Server['REMOTE_ADDR'];
</code></pre>

<p>Can anyone help me out?</p>

<p>The output file always either ends up empty, and causes an error stating that the file name cannot be empty, or it just outputs .txt.</p>

<p>I've tried multiple variations, but no success so far.</p>
