LAMP On Focus

Icon

PHP, MySQL, Linux practical usage.

Pixel Tracker

A Web bug is an invisible 1×1 clear gif that is embedded in a web page or e-mail. These can be used in your emailers to track the actual views of your marketing mailers, capture user data on navigation patterns and high visit areas on your site.

Leave it to your imagination as to what to do with it.

We need the following list of operations in our tracker, for it to be of any use.

We need a appropriate p3p policy.

header("P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"");

We need a transparent 1×1 pixel gif image.

//Image header
header("Content-Type: image/gif");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
header("Pragma: no-cache");

//Image Data
$gifData = base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==") ;

echo $gifData;

When we have cleared this 2 points, we log the data we need.

On this script, we have a day wise table rotator, a new table will be created for every day.
The script is pretty much self descriptive.

So, go ahead and give it a try.

Download the Tracker Script here.

Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Bookmarks

  • No bookmarks avaliable.

Friend Connect