Hi all!
Is there a php function that returns the location of the user (e.g. return the state/country of a user)?
Thanks.
help on function to know user location
Moderator: General Moderators
-
mscardenas
- Forum Newbie
- Posts: 5
- Joined: Wed May 30, 2007 1:18 am
Re: help on function to know user location
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.htmmscardenas 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.
I use their services at two of my domains: http://poatree.org and http://usselectra.org.
-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
Re: help on function to know user location
no this function.
but can return IP.
but can return IP.
- jimthunderbird
- Forum Contributor
- Posts: 147
- Joined: Tue Jul 04, 2006 3:59 am
- Location: San Francisco, CA
Re: help on function to know user location
You can get the user's ip but since you don't have the ip location mapping database, you can't directly do it.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: help on function to know user location
http://www.hostip.info has an API - maybe that would work?