Net_GeoIP PHP script not sending prosper202 link

by sean83
3 replies
I'm registered with Optimal Fusion CPA network, i've set up my affiliate links, global postback URL and tracking pixels for my campaigns and Optimal Fusion, picks them up fine and registers the clicks so i can see in my account dashboard.

However i've included my prosper202 tracking links which contain my affiliate links in a NET_GeoIP PHP script, however the clicks aren't showing on my CPA networks end.

I've tried contacting them, but no response.

Here is the script.

Code:
<?php
// Next two lines are for Beyond Hosting
// Don't forget to change your-domain
require_once '/home/mydomain/php/Net/GeoIP.php';
$geoip = Net_GeoIP::getInstance('/home/mydomain/php/Net/GeoIP.dat');
try {
  $country = $geoip->lookupCountryCode($_SERVER['REMOTE_ADDR']);

  switch((string)$country) {
    case 'AU':
      $url = "http://myprosper202link.com/tracking202/redirect/dl.php?t202id=####&t202kw=AU";
      break;
    case 'CA':
      $url = "http://myprosper202link.com/tracking202/redirect/dl.php?t202id=####&t202kw=CAN";
      break;
    case 'GB':
      $url = "http://myprosper202link.com/tracking202/redirect/dl.php?t202id=####&t202kw=GB";
      break;
    case 'US':
      $url = "http://myprosper202link.com/tracking202/redirect/dl.php?t202id=####&t202kw=USA";
      break;
    default:
      $url = "http://myprosper202link.com/tracking202/redirect/dl.php?t202id=####&t202kw=intl";
  }

  header('Location: '.$url);
} catch (Exception $e) {
  // Handle exception
}
?>
Can anyone help me out here?


Thanks
#netgeoip #php #script #sending
  • Profile picture of the author jaimegm
    Ok this should work, but I have some comments:
    1.- Why are you putting (string) in switch( (string)
    2.- Did you already tested that Net_Geo is working, I mean are you completely sure that is working? You have to be sure that is working asking for help to somebody currently living in the specified country or using some proxy, which sometimes is not very reliable.
    Probably always is exiting via catch, try section by section.
    -Check also the prosper links individually.
    {{ DiscussionBoard.errors[8196308].message }}
    • Profile picture of the author sean83
      Originally Posted by jaimegm View Post

      Ok this should work, but I have some comments:
      1.- Why are you putting (string) in switch( (string)
      Sorry i'm a novice at PHP, so have no idea what you what, i'm basically using this script that i got from a blog post.
      {{ DiscussionBoard.errors[8196418].message }}
  • Profile picture of the author jaimegm
    Ok, I see, and I can give you a lot of explanations, but I am going to give you a fast and easy answer: Spend $5.00 and ask for help at fiverr, just search for php programming and ask them if they can do the fix, I am sure you will find more than one that will be able to help you.
    {{ DiscussionBoard.errors[8197548].message }}

Trending Topics