Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created Oct 9, 2011
Embed
What would you like to do?
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