I have thousands of IP addresses of visitors to my site, what tools can I use to convert these into lat/lng coordinates? I will then be able visualise the data on a map with filters for further demographics gathered.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
this might also help https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6103179.html
http://www.telize.com and http://www.iptolatlng.com both provide solutions in JSON
For one of my sites I made use of maxmind's free geolite country database which can be downloaded here: http://www.maxmind.com/app/geolitecountry
They also provide a city level version which includes the long/lat: http://www.maxmind.com/app/geolitecity
but note that the accuracy on the free version is a lot lower than the paid version.
I suggest using Google Analytics to your problem, but if you want to try yourself here is a starting point:
Take a look at this link http://www.geoplugin.net/php.gp, you get a full list of details about that ip address position, including latitude and longitude.
It is not that acurate but it works, and I use it. Here is a php script actually in use :
You can see it working at http://whateverhappens.org/ip-addr/
And that a look at the Geoplugin website examples.