Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 19th Aug 2014, 07:39 PM   #1
HyperActive Warrior
War Room Member
 
magnus1's Avatar
 
Join Date: 2010
Posts: 192
Thanks: 13
Thanked 28 Times in 23 Posts
Default
RE: PHP rotator script
Share on: 
fb share twitter share gplus share more share

Hey guys,

I need a rotator script using geotargeting that will send top tier traffic (say US, GB, AUS etc.) to "landing page 1" and all other traffic to "landing page 2". I'm not worried about sub id's or anything like that.

I used to use this for CPA:

<?php

//country code redirect
require_once('geoplugin/geoplugin.class.php');
$geoplugin = new geoPlugin();

$geoplugin->locate();

$country_code = $geoplugin->countryCode;

switch($country_code) {
case 'US':
$url = "AFF_LINK&aff_sub=" . $_GET['a'] . "&aff_sub2=" . $_GET['b'] . "&aff_sub3=" . $_GET['c'];
break;
default: // exceptions
$url = "HOMEPAGE";
break;
}

header("Location:$url");
die;

?>

Can this be modified to do what I need? I understand basic html but this is above my head. Thanks.


Michelle
magnus1 is offline  
Unread 19th Aug 2014, 07:40 PM   #2
Banned
War Room Member
 
Join Date: 2007
Location: Virginia, USA.
Posts: 16,863
Thanks: 5,852
Thanked 13,083 Times in 6,963 Posts
Blog Entries: 1
Default
Re: PHP rotator script
Share on: 
fb share twitter share gplus share more share

You need to ask this here
Programming
sbucciarel is offline  
Unread 19th Aug 2014, 07:44 PM   #3
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,472
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: PHP rotator script
Share on: 
fb share twitter share gplus share more share

I'd jump on fiverr and find a php programmer. Should be easy for most.

WillR is offline  
Unread 19th Aug 2014, 07:58 PM   #4
HyperActive Warrior
War Room Member
 
magnus1's Avatar
 
Join Date: 2010
Posts: 192
Thanks: 13
Thanked 28 Times in 23 Posts
Default
Re: PHP rotator script
Share on: 
fb share twitter share gplus share more share

Thanks for the tip.
magnus1 is offline  
Unread 19th Aug 2014, 10:13 PM   #5
Senior Warrior Member
War Room Member
 
kpmedia's Avatar
 
Join Date: 2010
Location: USA, Europe
Posts: 1,163
Thanks: 57
Thanked 266 Times in 213 Posts
Default
Re: PHP rotator script
Share on: 
fb share twitter share gplus share more share

It'll end up simple if/them type statements.

Tap into Maxmind via API to get geo.
If IP match region, load page A
If IP match region, load page B
else
If IP does not match region, load page X

The hard part is the API.
The PHP is somewhat simple by comparison.

You can do this outside of WordPress, yet integrate it to appear as if it's happening inside WordPress. That will make it somewhat easier.

kpmedia is offline  
Unread 20th Aug 2014, 04:44 PM   #6
HyperActive Warrior
War Room Member
 
magnus1's Avatar
 
Join Date: 2010
Posts: 192
Thanks: 13
Thanked 28 Times in 23 Posts
Default
Re: PHP rotator script
Share on: 
fb share twitter share gplus share more share

Thanks. I was hoping to offer a free solution for my subscribers. I was going to recommend Tracking202 but most of them would find it too complicated to use.
magnus1 is offline  
Closed Thread


Bookmarks

Tags
php, rotator, script


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




All times are GMT -6. The time now is 03:47 PM.