Forum Moderators: coopster
I now have another question/problem...
Whenever I tried to load a page with $_SERVER["REMOTE_ADDR"] to grab my own IP, I sometimes get weird results such as 203.168.223. 161 (pls don't delete this IP, which doesn't point anywhere) and 61.18.186.x, both of which aren't my IP. Do you guys know the reason why $_SERVER["REMOTE_ADDR"] would have this behaviour?
Thanks much!
Sometimes they don't.
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$message .= "From ".$_SERVER["HTTP_X_FORWARDED_FOR"];
$message .= " using proxy ".$_SERVER["REMOTE_ADDR"]."\n";
} else {
$message .= "From ".$_SERVER["REMOTE_ADDR"]."\n";
}