Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-19-2010, 12:48 PM GEOIP Script Help.
Junior Talker

Posts: 1
Name: Laura
Trades: 0
Hey, I got this error;

Quote:
Parse error: syntax error, unexpected T_CLASS in /home/c*****pt/public_html/Domain/ccr.php on line
Code:
<?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?
miss-www is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-19-2010, 03:19 PM Re: GEOIP Script Help.
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
No idea, but if your on linux you could try this script / code:
http://www.hauntednipple.co.uk/?p=21
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 04-19-2010, 03:43 PM Re: GEOIP Script Help.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Is there a function called geoPlugin() (same case) in the class file??
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to GEOIP Script Help.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12464 seconds with 12 queries