Re: How would you create a tracking pixel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks. A transparent pixel is what I'll need - any guidance on that?


On Jul 25, 2005, at 12:37 PM, Matt Darby wrote:

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?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux