ticket.php (Source)

<?php

file_put_contents("tickets.txt", $_GET['ticket'] . "\n", FILE_APPEND);

$name = 'ohnoes.jpg';
$fp = fopen($name, 'rb');

header("Content-Type: image/jpg");
header("Content-Length: " . filesize($name));

// dump the picture and stop the script
fpassthru($fp);

?>