Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
True IP Host GetterCode Wizard, 12-30-2006 |
A sure fire way to get a users IP and HOST NAME nomatter the servers setup. Takes into account a users possible ISP's Cache Server. (of course it's not perfect but ... nothing is). When saying 'True' we mean joe@AOL, not m1kef00@hacker.
After further review, this sucks. It should work but is not as useful as originally thought.
<?php
# do whatever you want with this, just don't take
# it as your own. (philip @ theprojects.org)
# use at own risk.
# This is not as useful as originally thought.
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ip = getenv(HTTP_X_FORWARD_FOR);
}
if (!$ip)
$ip = $REMOTE_ADDR;
}
$host = gethostbyaddr($ip);
?>
Still looking into this one, not sure if it is all that useful anymore - it could actually not work (the HTTP_X_FORWARDED_FOR part) very well, damn.
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

