I'm a moderator there.. I believe I posted some code to fix the problem on the forum itself:
<?php
/* Yonder is a slightly modified function what am gotten from yuor forumz */
function get_remote_address()
{
// If HTTP_X_FORWARDED_FOR is set we grab the first address in the list
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $_SERVER['HTTP_X_FORWARDED_FOR'], $addresses))
return "HTTP_X_FORWARDED_FOR was set: ".$addresses[0];
}
// If no address was found in HTTP_X_FORWARDED_FOR, we try HTTP_CLIENT_IP and if that isn't set we return REMOTE_ADDR
return (isset($_SERVER['HTTP_CLIENT_IP'])) ? "CLIENT_IP was set: {$_SERVER['HTTP_CLIENT_IP']}" : "REMOTE_ADDR was set: {$_SERVER['REMOTE_ADDR']}";
}
echo get_remote_address()."<br />".$_SERVER['REMOTE_ADDR'];
?>
Unfortunatly, we didn't get to use the code.. But none the less, the IP range still isn't working eventhough we had updated the forum.
-Antony (Tux)
See you at the bitter end!