Question

I have installed net_geoip on my web host and am encountering the error Fatal error: Class 'Net_GeoIP' not found in /home/heyitspr/public_html/beta_simplecraft.biz/index.php on line 3 when I run the script that is posted below:

$geoip = Net_GeoIP::getInstance('GeoIP.dat', Net_GeoIP::SHARED_MEMORY); $country_name = $geoip->lookupCountryName($_SERVER['REMOTE_ADDR']);

print_r ($country_name);

I am new to installing plugins with apache so please explain it in simpler terms. Thanks

Était-ce utile?

La solution

Seems like you have not included your GeoIP library. Try including it on your index.php code

include_once('GeoIP.php');
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top