Created
May 6, 2011 01:25
-
-
Save tobsn/958298 to your computer and use it in GitHub Desktop.
one transparent or colored gif pixel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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' ); | |
if( !empty( $_GET['c'] ) ) { | |
$rgb = preg_replace( '/[^0-9a-z]/i', '', $_GET['c'] ); | |
die( sprintf( | |
'%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,0,0, | |
hexdec( substr ( $rgb, 0, 2 ) ), | |
hexdec( substr ( $rgb, 2, 2 ) ), | |
hexdec( substr ( $rgb, 4, 2 ) ), | |
0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59 | |
) ); | |
} | |
else { | |
die( sprintf( '%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,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59 ) ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment