Shortly after taking a new job, Graham noticed that his new colleagues had a rather peculiar metric for determining software quality: cleverness. The standard measurements of cost, performance, maintainability, and so on, were afterthoughts -- nay, hindrances -- to their vision. Oh no, they were special, and so would be the software that they developed.

One of Graham's first tasks was an apparently common one for the developers there: add an image to the site so that the graphic designer may use it. It seemed a bit odd of a task; after all, the designers had full access to the site, why could they drop their .gif image into an /images folder? No less, Graham complied and sought out the /images folder to place the image in.

Unable to locate this common folder, Graham checked with a coworker. We keep all of our images in images.php, his coworker explained, so just put it in there. Thinking that "images.php" would contain a hint to where this directory is, Graham quickly opened up the code file. To this day, he is still awed by its 600KB-worth of cleverness ...

/**********************
 __images.php__

 Displays an embedded image file

 (C) Initech Solutions, 2001
**********************/  
  
$images = array();

$images["doc_filetype.gif"] = 
  "R0lGODlhDg7nZm11aG52aG94aHB3aXB4IfkE/ywODghYAwQQIIDAgIIEEioEIFAgQQIEByxsOLBg" .
  "xIkNCh9eTMiwIQgVDQpgSDDAR4IoCZIsmTHlx44DHbp8uRJlwgE0ZW4kkFOnS5MdQaZUCZRhTZRG" .
  "P5psSTAgOw==";
$images["pdf_filetype.gif"] =
  "R0lGODlhDg7nP0FJQkRNREZQRUhRSEtUS05YTlFaUVRdUlZgVFpjVl5oWF1mWF5oWmBqIfkE/ywO" .
  "DgiHAQgMIICAAQQECChw4ICBAQYREihgICECBAkQFBhwcEKKBy5iPJDw4EGQIhkkOMBRoYCJFUMy" .
  "WJBgo8uPFREsmKnRo0KcBxIomEmSQEucCRIwaFDT6M2JSRc0UFnA6UGoSRU0aHAg6k+ESYUuXcCS" .
  "o0cCYRcsGJrAQEmFYcMymGlAocGAOw==";

/* Snipped a lot of images */

$images["open_logo.gif"] =
  "R0lGODlhEwFP50JFTkVIT0RGUEZIUUlMVUtOWE5SW1BUXVJWYFRbY1ZdaFhdZlheaFpgaSH5BP8s" .
  "EwFPCP4TLFiggEGDBggIIEDAAgQNChg4gKBixQQYM2rcaLFjR4weQ4ocWfGASQQmU55UyVKlxZ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
  "ZILVdfPJZBv3kiCRGUnDiqqFPX/zpidVle1Wi+b5qKsaiLXJTo9hqdOJqREYmEjJZKBVlmWqb4vW" .
  "d0r6eSpVqlZzqs7oUjTVGPF4kE3xoa9qnrKqp1sSgYV5lthHphK4JR8XcpCmOid3acVZrPODIVPK" .
  "oQNqjc2qWzYBltp2qRF5j8DojSoNCkmdASs0+SXcOkWvKEpTtqXpiY2Lw6x8tn4GDQqk60qURnZz" .
  "dveG8bpmckMdNAkR+HmoVTmL+hptFOSqPLqemJWS78mEa8iCpfZ+8bqiCRAwPkVW6qKF/veMUxou" .
  "oFh2rkMjaDJ1oLdJaqJoZjg7st84EAnxdxD7lqm5bOrYk1VKVRorcT+oi7ETEDs=";
  
if(isset($_GET["image"]))
{
  header("content-type: image/gif");
  print base64_decode($images[$_GET["image"]]);
  exit;
}
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!