find location by using ip address in php [duplicate]
Possible Duplicate:
IP to location + local time?
i want to know ,is there any way to find a particular client location by using his ip address.
like---
- your ip - w.x.y.z
- your country - country name
- your state - state name
- your place/town/city/village - place/town/city/village name
- your ISP provider - isp provider name
- your home street开发者_高级运维 - home address (if possible)
thanks.
MaxMind offers several options. Have a look at the GeoIP PHP API. The paid version of their data offers much more but the GeoLite Country and GeoLite City products they offer may work quite well for you.
For more information, you can also refer to the documentation on PHP's website as well. It includes instructions on setting it up.
You have to look that up in a database. There are various databases of different quality and price. A quite good starting point would be here: http://www.joefission.com/2007/11/geocoding-based-on-an-ip-address/
You have to try which database suits your need, and how much you are willing to spend. Quality is not that good. You can't expect street names. For me here in Austria, it is somtimes up to ~100km wrong.
精彩评论