Help with MaxMind install - $250

Status
Not open for further replies.

Player1

New member
Jan 20, 2009
1
0
0
I'm looking for someone who can guide me on how to install MaxMind's geo database onto my server so that I can show the country and city of the visitors who comes to my landing pages.

PM me if anyone has experience.
 


I setup up the free version in no time.

Just upload:
GeoLiteCity.dat
GeoIPRegionVars.php
Geoip.inc
Geoipcity.inc


Then in your files use the php code:

PHP:
<?php
include("geoip.inc");
include("geoipcity.inc");
include("geoipregionvars.php");
$gi = geoip_open("./GeoLiteCity.dat", GEOIP_STANDARD);
$rsGeoData = geoip_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);
?>

Where ever you want to out put the information use:

PHP:
<?= htmlentities($rsGeoData->city . "," . $rsGeoData->region) ?>

If you want to know what variables you can use try adding this:

PHP:
<?php
include("geoip.inc");
include("geoipcity.inc");
include("geoipregionvars.php");
$gi = geoip_open("./GeoLiteCity.dat", GEOIP_STANDARD);
$rsGeoData = geoip_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);

print "<pre>";
print_r($rsGeoData);
print "</pre>";
?>
 
Status
Not open for further replies.