Detecting the country of an IPv4 Address with PHP/SQLite3


This file contains a PHP script program that gets a list of IPs separated by comma and that returns them alonw with their country name (and in a later version, their contry code instead).

First we download the SQLite3 database containing the IP address ranges and their corresponding countries from:
http://archive.org/download/data_web2.0/common/ipv4_country.db

Then we need to to create the main PHP script file:
/index.php


The structure definition of our SQLite3 database above is at:
/ipv4_country.sql