Home Home  

Project: IP number to country

This project allows you to retrieve the country of the visitor using the IP number of the visitor.

Very handy when you are developing a internationalized application. The ISO code, in lowercase, can be used to set the interface language.

By passing the IP number to a function, you'll get the following information:

  • ISO 3166 Code, 2 characters, might be used to set the culture
  • Country, 20 characters

Techniques used: PHP5, MySQL (although any sort of database might be used).

The project will become available as a symfony Plugin (Open Source). It's already made available by me in the form of a symfony snippet and can be found over here.

The IP data is imported from the webnet77 database, probably the most frequently update database on the web, which is weekly downloaded using CRON to the webserver.

See example below:

Your hostname:38.107.191.85
Your IP number:38.107.191.85
Your IP numerical:644595541
Data retrieved from IP database:
ISO code:USYour flag
Country:UNITED STATES
Updated at: 14-3-08

Zoek

 
 


Populair



Info

Over deze site
Copyright
Contact
Sitemap


Gebruikersopties

Verander lettergrootte (Help)


Afdrukken (Help)

 


Valid XHTML 1.0 Transitional