Jump to content

GEO IP Help.


3r0ss

Recommended Posts

 

Hey, I got this error;

 

Parse error: syntax error, unexpected T_CLASS in /home/c*****pt/public_html/Domain/ccr.php  on line 3

 

This is the script;

 

    <?php
    // ccr.php - country code redirect
    require_once(’/geo/geoplugin.class.php’);
    $geoplugin = new geoPlugin();
    $geoplugin->locate();
    $country_code = $geoplugin->countryCode;
    switch($country_code) {
    case ‘US’:
    header(’Location: http://www.yourdomain.com/usoffer.php’);
    exit;
    case ‘CA’:
    header(’Location: http://www.yourdomain.com/caoffer.php’);
    exit;
    case ‘GB’:
    header(’Location: http://www.yourdomain.com/gboffer.php’);
    exit;
    case ‘IE’:
    header(’Location: http://www.yourdomain.com/irelandoffer.php’);
    exit;
    case ‘AU’:
    header(’Location: http://www.yourdomain.com/australiaoffer.php’);
    exit;
    case ‘NZ’:
    header(’Location: http://www.yourdomain.com/newzealandoffer.php’);
    exit;
    default: // exceptions
    header(’Location: http://www.yourdomain.com/allelseoffer.php’);
    exit;
    }
    ?>

 

I have the geoplugin.class.php in the geo folder and I keep getting the same error.

 

Any help?

 

Link to comment
https://forums.phpfreaks.com/topic/199026-geo-ip-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.