Last active
May 31, 2017 19:47
-
-
Save dkesberg/2828e921f4e7c3ee380e to your computer and use it in GitHub Desktop.
Transparent 1x1 image (png, gif)
This file contains hidden or 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
/** | |
* source: http://stackoverflow.com/questions/3203354/php-script-to-render-a-single-transparent-pixel-png-or-gif | |
*/ | |
// transparent 1x1 png | |
header('Content-Type: image/png'); | |
echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII='); | |
// transparent 1x1 gif | |
header('Content-Type: image/gif'); | |
echo base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw=='); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment