BackDoor- Door 1
You find yourself in a strange house with only a man on the phone as a guide.
4.13 / 5.00 25,829 ViewsMini Commando
Action adventure game with nazi enemies in the second world war.
3.96 / 5.00 21,038 Views<script type="text/javascript"
src="http://www.youragency.com/getunit.aspx?unit_id=123456&tracking_id=<?
echo $submission->getID() . $adtype->getID();
?>"></script>
In this example, the 'unit_id' parameter in the request string would be an id provided by the advertiser indicating this is a specific ad for the newgrounds account. The 'tracking_id' would be the tracking id used for filtering the earnings for the current submission.# Server & Authentication values
$host = 'www.youragency.com';
$path = '/earningsreport.aspx';
$port = 80;
$publisher_id = 12345;
$secret_token = "JKdhfkl9843hkjnsdf9knc9843h93cno39";
# Date range
$start_date = date("Y-m-01", strtotime('-1 month')); // first day of last month
$end_date = date("Y-m-t", strtotime('-1 month')); // last day of last month
# build the request query
$query = "pubisher_id=$publisher_id";
$query .= "&secret_token=$secret_token";
$query .= "&start_date=$start_date":
$query .= "&end_date=$end_date":
# construct the POST header
$post="POST $path HTTP/1.1
Host: $host
Content-type: application/x-www-form-urlencoded
User-Agent: Mozilla 4.0
Content-length: ".strlen($query)."
Connection: close
$query";
# connect to the host
$socket=fsockopen($host,$port, $errNo, $errString, 20000);
if (!$socket) throw new Exception("Connection failed: $errString ($errNo)");
# send the POST request
fwrite($socket,$post);
// read and parse results here{tracking_id:526374801, impressions:6590, earnings:3.78}
{tracking_id:524729101, impressions:12348, earnings:7.46}
{tracking_id:468291101, impressions:235, earnings:0.08}
{tracking_id:429453201, impressions:3262, earnings:2.01}
..etc..