2018-05-26 10:59:29 +00:00
|
|
|
<?php
|
2018-05-27 16:15:15 +00:00
|
|
|
$img_array = glob("gallery/*.{gif,jpg,png}",GLOB_BRACE);
|
2018-05-26 10:59:29 +00:00
|
|
|
|
|
|
|
$img = array_rand($img_array);
|
|
|
|
|
|
|
|
$imgurl=$img_array[$img];
|
|
|
|
|
|
|
|
if($imgurl) {
|
|
|
|
header("Location: " . $imgurl);
|
|
|
|
exit();
|
|
|
|
} else {
|
|
|
|
exit('error');
|
|
|
|
}
|
|
|
|
?>
|