Caterham - 9:02 am on Jul 28, 2009 (gmt 0) Btw:
header("HTTP/1.0 404 Not Found");
That doesn't work here. Your location header will cause a 302 redirect sent to the client, not a 404 not found (and the client will have to make another HTTP request; yes, that is slower of course than pointing the request directly to the gif).
is an rfc violation, the location header must be an URL (http://example.com/404.gif), not just an URL-path, but many clients are supporting this....