15 lines
296 B
PHP
Executable File
15 lines
296 B
PHP
Executable File
<?php
|
|
$directory = "./uploads/audited";
|
|
$old_files = array_diff(scandir($directory), array('..', '.'));
|
|
|
|
$files=[];
|
|
foreach($old_files as $file) {
|
|
$files[] = $file;
|
|
}
|
|
|
|
if(empty($files)) {
|
|
die();
|
|
}
|
|
|
|
$random_index = rand(0, count($files)-1);
|
|
echo("/uploads/audited/".$files[$random_index]); |