5

I have installed the geoip for getting the address based on the remote_server ip in php. I have installed the Geoip package in my system and also i have installed the php5-geoip php extension. But while running the following script it is showing the fatal error.

geoip_open("GeoIP.dat",GEOIP_STANDARD);

the error is

Fatal error: Call to undefined function geoip_open()
Kalaiyarasan
  • 12,134
  • 8
  • 31
  • 49

1 Answers1

5

include the geoip_inc file after that it will not show this error and its maxMind librarynot php extension

include("include/geoip.inc");

$gi = geoip_open("include/GeoIP.dat", GEOIP_STANDARD);
Yogesh Suthar
  • 30,424
  • 18
  • 72
  • 100