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?
--
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?
Create
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);
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);
I did some more STFW and came up with this - I'll try it to see if it
works.
Header( Content-type: image/gif);
printf (%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%
c%c%c%c%c%c%c%c%c%c%c%c%c,
71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0
5 matches
Mail list logo