<?php
header('Content-type: image/jpeg');
$imgs = scandir($_GET['url']);
$img_id = mt_rand(0,(count($imgs)-1));
header('Location: '.$imgs[$img_id]);
?>