RE: PHP rotator script

by 5 replies
6
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
#programming #php #rotator #script
  • Banned
    You need to ask this here
    Programming
  • I'd jump on fiverr and find a php programmer. Should be easy for most.
  • Thanks for the tip.
  • 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.
    • [1] reply
    • 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.

Next Topics on Trending Feed

  • 6

    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.