Skip to content

Instantly share code, notes, and snippets.

@petrabarus
Created April 19, 2013 06:13
Show Gist options
  • Save petrabarus/5418457 to your computer and use it in GitHub Desktop.
Save petrabarus/5418457 to your computer and use it in GitHub Desktop.
PHP 1x1px gif
<?php
header("Content-type: image/gif");
header("Content-length: 43");
header("Cache-control: private, no-cache, no-cache=Set-Cookie, proxy-revalidate");
header("Pragma: no-cache");
$fp = fopen("php://output", "wb");
fwrite($fp, "GIF89a\x01\x00\x01\x00\x80\x00\x00\xFF\xFF", 15);
fwrite($fp, "\xFF\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00", 12);
fwrite($fp, "\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02", 12);
fwrite($fp, "\x44\x01\x00\x3B", 4);
fclose($fp);
flush();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment