You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
250 B
8 lines
250 B
<?php
|
|
|
|
$files = scandir(__dir__ . '/static/banners/', SCANDIR_SORT_NONE);
|
|
$files = array_diff($files, ['.', '..']);
|
|
|
|
$filename = $files[array_rand($files)];
|
|
header("Location: /static/banners/$filename", true, 307);
|
|
header('Cache-Control: no-cache');
|
|
|