You are here: Re: [PHP] How would you create a tracking pixel? « PHP « IT news, forums, messages
Re: [PHP] How would you create a tracking pixel?

Posted by Matt Darby on 07/25/05 22:37

A blank (transparent) pixel would be more difficult, but a simple
colored pixel would be easy:

In target file:
<img src=pixel.php>

pixel.php

<?
$im=imagecreate(1,1);
$white=imagecolorallocate($im,255,255,255);
imagesetpixel($im,1,1,$white);
header("content-type:image/jpg");
imagejpeg($im);
imagedestroy($im);
?>

I guess this begs the question, why not use session variables to track
activity??

Matt Darby

Brian Dunning wrote:

> I want to create a pixel that can be used to track certain activity
> on the site. I've got it working fine: I just mod_rewrite
> "spacer.gif" to a PHP app that does what I want it to do; but then I
> don't know how to actually return a blank pixel. Can anyone point me
> in the right direction?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация