April 17, 2013

import GeoIP csv to MySQL DB provided by MaxMind

you can download GeoIP csv database from http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip

unzip  and extract the csv file just upload it your web server

foreach($ips as $ip)
$ip=str_replace('"',"'",$ip); //this variable cantains sample string '','','16777216','16777471','AU','Australia'   which means you can use this string directly in mysql insert query

//perform your mysql insert query here


that is all :))

No comments:

Post a Comment