just use the gd functions if your server has them:
header ("Content-type: image/gif");
$im = @ImageCreate 1, 1)
ImageGif ($im);
that'll pass out a 1x1 gif.
Just make sure all your code doesn't output anything at all (apart from the header & image, of course 🙂), and you'll be fine.