3r0ss Posted April 19, 2010 Share Posted April 19, 2010 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 More sharing options...
teamatomic Posted April 19, 2010 Share Posted April 19, 2010 Backticks and single quotes are not the same thing. Dont use backticks. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/199026-geo-ip-help/#findComment-1044689 Share on other sites More sharing options...
3r0ss Posted April 19, 2010 Author Share Posted April 19, 2010 What do you mean? Sorry this isn't my script. Im just trying to get it to work so I can use it. Thanks. Link to comment https://forums.phpfreaks.com/topic/199026-geo-ip-help/#findComment-1044694 Share on other sites More sharing options...
teamatomic Posted April 19, 2010 Share Posted April 19, 2010 Change the backticks to single quotes. Dont know how to make it any plainer than that. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/199026-geo-ip-help/#findComment-1044795 Share on other sites More sharing options...
seventheyejosh Posted April 19, 2010 Share Posted April 19, 2010 require_once(’/geo/geoplugin.class.php’); != require_once('/geo/geoplugin.class.php'); Change the ` into ' Link to comment https://forums.phpfreaks.com/topic/199026-geo-ip-help/#findComment-1044810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.