Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created October 9, 2011 03:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farinspace/1273259 to your computer and use it in GitHub Desktop.
Save farinspace/1273259 to your computer and use it in GitHub Desktop.
PHP function to write a blank 1px gif
function writeGif()
{
header( 'Content-type: image/gif' );
header( 'Expires: Wed, 11 Nov 1998 11:11:11 GMT' );
header( 'Cache-Control: no-cache' );
header( 'Cache-Control: must-revalidate' );
echo base64_decode('R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment