|All requests||>||What is the best PHP localization vis...||>||Request new recommendation||>||Featured requests||>||No recommendations|
by MDSAY - 8 years ago (2014-12-03)
Hello, I need a solution to determine the country of a visitor of my Web site with PHP.
new requesters could try this, it is simple and it works fine...
This is one of the best class. Store information in database for user country, city, state, Geo coordinates, IP address, ISP, ORG, and much more
There are several ways to obtain the location of a visitor.
There are also several Web services that you can call to get the location of the user from the IP address. The problem is that some that are free to use are a bit overloaded.
An alternative is to download the IP range database from GeoIP service and query that database locally on your server.
Some packages query a local MySQL database loaded with GeoIP database data. It works but you need to setup and update the database yourself. Performing too many database queries may slow down your site.
This class uses a simpler solution that consists on querying the GeoIP database file directly. No MySQL database is necessary.