Page 1 of 1
help on function to know user location
Posted: Sun Jan 13, 2008 11:07 pm
by mscardenas
Hi all!
Is there a php function that returns the location of the user (e.g. return the state/country of a user)?
Thanks.
Re: help on function to know user location
Posted: Mon Jan 14, 2008 12:19 am
by califdon
mscardenas wrote:Hi all!
Is there a php function that returns the location of the user (e.g. return the state/country of a user)?
Thanks.
No, because that's not directly determinable. However, geographic locations of IP addresses can be estimated and there is at least one organization that maintains a database of such estimates:
http://www.geobytes.com/FreeServices.htm
I use their services at two of my domains:
http://poatree.org and
http://usselectra.org.
Re: help on function to know user location
Posted: Mon Jan 14, 2008 1:15 am
by yanglei1979
no this function.
but can return IP.
Re: help on function to know user location
Posted: Mon Jan 14, 2008 1:30 am
by jimthunderbird
You can get the user's ip but since you don't have the ip location mapping database, you can't directly do it.
Re: help on function to know user location
Posted: Mon Jan 14, 2008 3:43 am
by Kieran Huggins
http://www.hostip.info has an API - maybe that would work?