Skip to content

Instantly share code, notes, and snippets.

@benthebear
Created July 18, 2010 12:21
Show Gist options
  • Save benthebear/480366 to your computer and use it in GitHub Desktop.
Save benthebear/480366 to your computer and use it in GitHub Desktop.
<?php
// Tiny Skript to click do something with my stuff.
// Do something here
// Tiny Clicktracker
if($_SERVER["HTTP_REFERER"]!=""){
$file = fopen("counter.txt", "a+");
fwrite($file, time()." | ".$_SERVER["HTTP_REFERER"]."\n");
fclose($file);
}
// Finally create and deliver image here
header ("Content-type: image/png");
$im = @ImageCreate (1, 1)
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 255, 255, 255);
ImagePNG ($im);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment