Automatic location (but not redirection!)
Hello!
I'm trying to detect location from user and put in the Location box, like in indeed.com
I was reading several posts and of course this:
http://forums.appthemes.com/classipr...nal-php-16586/
with little errors, but can help:
I put this code, because I need only detection:
#Geolocalizacion Pablo
re_once('geoip.inc');
$gi = geoip_open('GeoIP.dat', GEOIP_MEMORY_CACHE);
$country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);
but I get a 500 internal error when I go to my site. Of course I've geoip.inc and GeoIP.dat in the same folder
This is the error log in Apache:
[Tue Apr 30 09:28:40 2013] [error] [client 77.27.64.205] PHP Fatal error: Call to undefined function re_once() in /home/www/
wp-blog-header.php on line 3
but as I told I've geoip.inc in the directory
Any idea, post or manual about doing this?
Thanks in advance.