<p>This PHP code...</p>

<pre><code>207    if (getenv(HTTP_X_FORWARDED_FOR)) {
208        $ip   = getenv('HTTP_X_FORWARD_FOR');
209        $host = gethostbyaddr($ip);
210    } else {
211        $ip   = getenv('REMOTE_ADDR');
212        $host = gethostbyaddr($ip);
213    }
</code></pre>

<p>Throws this warning...</p>

<blockquote>
  <p><strong>Warning:</strong> gethostbyaddr()
  [function.gethostbyaddr]: Address is
  not in a.b.c.d form in <strong>C:\inetpub...\filename.php</strong> on line <strong>212</strong></p>
</blockquote>

<p>It seems that <em>$ip</em> is blank.</p>

Why don't you use
```
```
$_SERVER['REMOTE_ADDR']
```
```
and
```
```
$_SERVER['HTTP_X_FORWARDED_FOR']
```
```