The most probably is its use some function to recognize the country through your IP. There is a database with pairs "IP From - IP To" - "Country". The function (or class) take the value of the Country from the database with the ip given as parameter.
Is not 100% correct, but work good.
There is several pay services to make this too. In some cases you get country and city.
It is a link to download a php function. You need the funcion and the database. Here is the instructions.
http://chir.ag/tech/download/geoiploc/
In PHPClasses there is several like this too.
This is a pay service that give more data than the country:
http://www.ip2location.com/free.asp
In google "ip to country" or "ip to location" appears several good results. I dont remember, but if you need, i can search in my other machine: i used a script that not use database, it use a text file to retrieve the information.
The problem with all of this scripts is that the information must be updated frequently.
__________________
-----------------------
Please login or register to view this content. Registration is FREE
|