Code: Select all
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
header("Pragma: no-cache");
header("Content-Type: image/jpeg");
$dir = "/home/chaosdre/public_html/external/signature/images";
$dh = opendir($dir);
$images;
while (($file = readdir($dh)) !== false) {
$images .= $file . "-";
}
$images = substr($images, 5);
$images = explode("-", $images);
$max = count($images);
$i = rand(0, $max);
floor($i);
$image = "images/" . $images[$i];
readfile($image);
closedir($dh);
?>Code: Select all
$images = substr($images, 5);Those aren't the real image names, lol. Anyhow, it's .-.. since I added the - before I made them into a string. So basicly, what I'm asking is where are these two dots coming from? I have NO files in the images/ directory other than the images themselves..-..-myimage1.jpg-myimage2.jpg
Thanks,
-Nay