Results 1 to 1 of 1

Thread: Automatic location (but not redirection!)

  1. #1
    Thread Starter
    pablorodriguez's Avatar
    Join Date
    May 2012
    Location
    Spain
    Posts
    161
    Thanks
    11
    Thanked 4 Times in 3 Posts

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: May 8th, 2013, 05:59 AM
  2. Dimitris Profile Redirection
    By inetmagus in forum Vantage General Discussion (Legacy)
    Replies: 7
    Last Post: March 6th, 2013, 06:35 PM
  3. [SOLVED] Payment redirection
    By jancek in forum Report ClassiPress Bugs
    Replies: 5
    Last Post: October 3rd, 2012, 03:19 AM
  4. [SOLVED] Log in redirection not working in JR 1.5.3
    By woreillyjr in forum Report JobRoller Bugs
    Replies: 2
    Last Post: February 9th, 2012, 07:13 PM
  5. AUTOMATIC COUNTRY REDIRECTION - For International PHP Websites
    By zxen in forum ClassiPress General Discussion
    Replies: 11
    Last Post: January 21st, 2012, 05:35 AM