3 $spreads = scandir(__dir__
. "/static/spreads/");
4 $r = rand(2,sizeof($spreads) - 1);
5 $banner = __dir__
. "/static/spreads/" . $spreads[$r];
8 preg_match("/\..+$/", $banner, $ext);
10 $ext_proc = substr($ext[0], 1);
12 header('Content-Type: image/' . $ext_proc);