Skip to content

Instantly share code, notes, and snippets.

@dublado
Created August 21, 2011 23:56
Show Gist options
  • Save dublado/1161361 to your computer and use it in GitHub Desktop.
Save dublado/1161361 to your computer and use it in GitHub Desktop.
Creating a 1×1 transparent GIF response in PHP
<?php
//saves ip address and timestamp
$str=date("Y-m-d H:i:s") . ": ". $_SERVER['REMOTE_ADDR'] . "n";
file_put_contents("ip_list.txt", $str, FILE_APPEND);
Sourced from:
header("content-type: image/gif");
//43byte 1x1 transparent pixel gif
echo base64_decode("R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment