Initial commit

This commit is contained in:
franzz committed 2013-08-07 14:39:34 +02:00
commit 62cdc8b339
37 files changed
+2155

No files matched your search

Executable
+19
View File
@@ -0,0 +1,19 @@
<?php
define('IMAGE_PATH', 'images/');
//background selection
$asImages = glob(IMAGE_PATH.'{*.jpg,*.png,*.jpeg,*.gif}', GLOB_BRACE);
$sRandomImagePath = $asImages[array_rand($asImages)];
//get type
$sFileInfo = pathinfo($sRandomImagePath);
$sExt = strtolower($sFileInfo['extension']);
if($sExt=='jpg')
{
$sExt = 'jpeg';
}
//display image
header("Content-type: image/$sExt");
echo file_get_contents($sRandomImagePath);