Files

27 lines
499 B
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php
function randomImage ( $array ) {
$total = count($array);
$call = mt_rand(0,$total-1);
return $array[$call];
}
$tbs_images = array (
"rx2.jpg",
"rx2v3.jpg",
"phoromone-scent.jpg",
"koala-sexwear5.jpg"
);
// open the file in a binary mode
$name = randomImage($tbs_images);
$fp = fopen($name, 'rb');
// send the right headers
header("Content-Type: image/jpg");
header("Content-Length: " . filesize($name));
// dump the picture and stop the script
fpassthru($fp);
exit();
?>