View Full Version : php geo location
baby3311
September 21st, 2001, 04:51
Is there a way to get or guess the physical location of the visitor from the ip address in php?
That1guy
September 21st, 2001, 11:08
There is a program called neotrace, im not sure if it works with the ip you get from php function though.
baby3311
September 21st, 2001, 15:49
actually i was not planning to use any program, just the php script only.
i found this from the net:
if (empty($REMOTE_ADDR)) {
$userip="0.0.0.0"; $userhost="nul";
} else {
$userip= $REMOTE_ADDR; $userhost=gethostbyaddr("$userip");
}
It is easy to locate user by hostname. <-- How?
!ben
September 22nd, 2001, 08:45
I've answered a similar question to this before: http://www.freewebspace.net/forums/showthread.php?threadid=4375.
Although it doesn't use their ip address.
Hope this helps.
ashben
September 24th, 2001, 06:08
I don't think its that simple.
Read here: http://www.redherring.com/index.asp?layout=cod&channel=80000008
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.