PHP IP to Country


Hits: 2967  

phpIp2Country ( php IP to country ) – PHP geolocalization class with free IPs database

<?php
require('phpip2country.class.php');
        
$dbConfigArray=array(
        'host'=>'localhost',
        'port'=>3306,
        'dbName'=>'ip_to_country',
        'dbUserName'=>'ip_to_country',
        'dbUserPassword'=>'QrDB9Y8CKMdLDH8Q',
        'tableName'=>'ip_to_country',
);
        
$phpIp2Country=new phpIp2Country('278.180.178.18',$dbConfigArray);
        
print_r($phpIp2Country->getInfo(IP_INFO));
?>

 
Download Source: 
 
svn checkout http://php-ip-2-country.googlecode.com/svn/trunk/ php-ip-2-country-read-only

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch