TV202 Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download

Auto Postback Script

Justin Rumpf has graciously donated his auto-postback script for the Prosper202 community. If your affiliate network allows post back URLs, you can have them set the postback URL to point to this php script on your server, which will automatically update your subids for you as they come in. This means you wouldn't have to manually update your subids any more for the offers you run that support the post-back urls! Thanks Justin!

The Script

<?php

//**AUTHOR**: Justin Rumpf - Sixfoot3 Media

//This script was created to create automatic postbacks to prosper202 tracking from
//your affiliate network to your tracking.

//**INSTALLATION**: drop this page into your root tracking domain. this should be
//the same folder that you find 202-config.php in.

//**EXAMPLE**: you would give your affiliate network 
//http://mytrackingdomain.com/pb.php?subid=!!!subid!!!

//every time you get a conversion your affiliate network would fire off this url with the 
//subid  filled in instead of !!!subid!!!

//this will make it so you dont have to update your leads every day as they are 
//automatically  updated when the conversion happens.

// grabs your databse username and password to be able to update the database
include('202-config.php');
//grabs the subid out of the url
$sub $_REQUEST['subid'];
//connect to database
MySQL_connect("$dbhost","$dbuser","$dbpass");
//selects the database from 202-config.php
mysql_select_db($dbname) or die("Could not select database");
//update the lead column in 202_clicks table
mysql_query(" UPDATE 202_clicks SET click_lead=1 WHERE click_id='$sub'");
//update the lead column in the spy view table
mysql_query(" UPDATE 202_clicks_spy SET click_lead=1 WHERE click_id='$sub'");
//thanks message
echo "<BR>Thanks!<BR><BR>";
//you could easily double check the database for the insert here and give a different
//message if something went wrong.
?> 

Responses

  1. Charlar on Sep 25, 2008 at 6:20pm

    Firstly thanks to this script (Justin) and Prosper202 of course. I just wanted to check if I'm doing this right - I'm just a loser geek on php :)

    I use azoogle, so I've changed the "//http://mytrackingdomain.com/pb.php?subid=!!!subid!!!" to //http://mydomianandsubdomain.com/pb.php?subid=%%subid%%" and set it as the universal pingback url on the azoogle panel. (Used %% instead of !!! because that is the syntax in azoogle?)

    and entered my dbhost, user and pass in the script, saved it as a php file (pb.php) and uploaded it to the root of my prosper202 installation, is this correct?

  2. Wes Mahler on Sep 25, 2008 at 6:33pm

    We actually went ahead and put the post back URL into the new version of prosper202 1.1.0. If you goto SETUP STEP 8, it will have the post-back url to use for you integrated in already, that'll make it alot easier for ya

  3. Charlar on Sep 27, 2008 at 7:06am

    Thanks for the reply Wes, I hadn't realized that even though I had updated to 1.1 a few weeks ago, it's neat! I got the link and pasted it to the affiliate panel, let's see how it goes...

    By the way is there a difference between the tracking pixel, and the Post back URL? Which do you use, both?

  4. Wes (MasterlessSamurai.com) on Nov 05, 2008 at 2:04pm

    does anyone have a list of the CPA networks that support postback pixels (auto inserted). The only one I've come across is Neverblue, who makes it extremely easy to get your tracking up. Most of the others you have to wait on your affiliate manager.

  5. ricardo on Nov 06, 2008 at 8:25am

    @Wes:

    Copeac does support this as well.

  6. anon on Jan 25, 2009 at 8:06pm

    Someone should fix this script so you can not inject SQL into it!

  7. Wes Mahler on Jan 26, 2009 at 4:51am

    This script is actually no longer needed, as it is now built into the p202 1.2.0. and it does prevent sql injection (will remove this script)

  8. DavidDOchoa on Nov 01, 2009 at 11:43pm

    Wes, script is still here, lol.

Leave a Reply

Name (required)

Email (will not be published) (required)

Website

What does 4 + 4 equal? (required spam filter)


Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.