SEOBeginner
Regular Member
- Aug 19, 2012
- 216
- 74
Okay, I see that many people are trying to have a great content locker but not wanting to pay. So they use Ulock.it (a content locker service of AdGate Media).
For some reasons, I can not find the postback script that works for this (because they configured differently). So after struggling some hours, I've come up with this postback script for Adwork Media.
There are 3 things you need to do in order for the postback to work:
1. Set up your Tracking URL (when adding offers) in your Ulock.it account like this:
http://www.adworkmedia.com/go.php?camp=412&pub=1234&id=4213&sid={clickid}
This only applies to AdworkMedia.
The "sid" stands for SubID which might change for any other networks. These variations might apply:
2. Create a postback.php file and modify something in it:
Change the "sid" in
$sid = mysql_real_escape_string($_GET['sid']);
to anything that your network will send to your postback script as SubID. Like this:

Then change the YourUniqueCodeHere to your own.
echo '<script>window.location.href = "http://ulock.it/postback/YourUniqueCodeHere/'.$subid.'";</script>';
You can get yours in:

3. Upload postback.php to your host (any host that supports PHP) and give the URL http://yourwebsite.com/postback.php to your network.
Example:

There might be something that I've missed. I'll add it later if there is something that I need to add
Now, enjoy your Ulock.it's Content Locker
P/S: This is the first time I post a thread which explains these kinds of things. So I'll edit the post if I see something goes wrong.
For some reasons, I can not find the postback script that works for this (because they configured differently). So after struggling some hours, I've come up with this postback script for Adwork Media.
There are 3 things you need to do in order for the postback to work:
1. Set up your Tracking URL (when adding offers) in your Ulock.it account like this:
http://www.adworkmedia.com/go.php?camp=412&pub=1234&id=4213&sid={clickid}
This only applies to AdworkMedia.
The "sid" stands for SubID which might change for any other networks. These variations might apply:
- subid
- sid
- s1
2. Create a postback.php file and modify something in it:
PHP:
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { // Get Real IP
$IP = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$IP = $_SERVER['REMOTE_ADDR'];
}
//You might need to change the IPs, or just remove the "if" function completely, because this is to check the IP of Adwork Media Server :)
if ($IP=="67.227.230.75" || $IP=="67.227.230.76") { // Prevent against fraudulent postback attempts and verify that the postback IP is from an official AdWork Media Server
// get variables and prevent against SQL injections
$campaign_id = mysql_real_escape_string($_GET['campaign_id']); // Campaign ID
$campaign_name = mysql_real_escape_string($_GET['campaign_name']); // Campaign Name
$subid = mysql_real_escape_string($_GET['sid']); // Primary SubID
//You need to change the "sid" to any other variations of SubID that your network might use.
$subid2 = mysql_real_escape_string($_GET['sid2']); // Secondary SubID2
$subid3 = mysql_real_escape_string($_GET['sid3']); // Secondary SubID3
$commission = mysql_real_escape_string($_GET['commission']); // Commission
$status = mysql_real_escape_string($_GET['status']); // Status: 1 (Credited) or 2 (Reversed)
$ip = mysql_real_escape_string($_GET['ip']); // User IP Address
$reversal_reason = mysql_real_escape_string($_GET['reversal_reason']); // Reversal Reason (usually not sent)
$vc_value = mysql_real_escape_string($_GET['vc_value']); // Virtual Currency Only - VC Ratio * Commission
}
if ($status==1) {
echo '<script>window.location.href = "http://ulock.it/postback/YourUniqueCodeHere/'.$subid.'";</script>'; //Resend the SubID to ulock.it
} elseif($status==2) { // Status 2 is a Reversal/Chargeback Notification usually due to a fraudulent lead
// Place Revoke Code Here
// Subtract a Credit or Points from a user so that you don't lose money for revoked leads
}
// End IP Validation
?>
Change the "sid" in
$sid = mysql_real_escape_string($_GET['sid']);
to anything that your network will send to your postback script as SubID. Like this:

Then change the YourUniqueCodeHere to your own.
echo '<script>window.location.href = "http://ulock.it/postback/YourUniqueCodeHere/'.$subid.'";</script>';
You can get yours in:
3. Upload postback.php to your host (any host that supports PHP) and give the URL http://yourwebsite.com/postback.php to your network.
Example:
There might be something that I've missed. I'll add it later if there is something that I need to add
Now, enjoy your Ulock.it's Content Locker
P/S: This is the first time I post a thread which explains these kinds of things. So I'll edit the post if I see something goes wrong.
Last edited: