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

Leave a Reply

Name (required)

Email (will not be published) (required)

Website

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