Initial commit

This commit is contained in:
2013-08-07 14:39:34 +02:00
commit 62cdc8b339
37 changed files with 2155 additions and 0 deletions

19
background.php Executable file
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);