step 1: create a index.php file with in your images folder. and then paste this code into it, then save now open the index file in your browser and you should see an image. if not pm or pst here and i will help you out.
QUOTE
<?php
if ($dir = opendir("."))
{
$list = buildimagearray($dir);
displayrandomimage($list);
}
// This function reads all the files in the current directory and adds all image files to the array $list[]
function buildimagearray($dir)
{
while (false !== ($file = readdir($dir)))
{
if (!is_dir($file) && getimagesize($file))
{
$list[] = $file;
}
}
return $list;
}
// This function selects a random image, determines the mime type, opens the file for reading,
// and then outputs the image
function displayrandomimage($list)
{
srand ((double) microtime() * 10000000);
$sig = array_rand ($list);
$size = getimagesize ($list[$sig]);
$fp = fopen($list[$sig], "rb");
if ($size && $fp)
{
header("Content-type: {$size['mime']}");
fpassthru($fp);
exit;
}
}
?>
if ($dir = opendir("."))
{
$list = buildimagearray($dir);
displayrandomimage($list);
}
// This function reads all the files in the current directory and adds all image files to the array $list[]
function buildimagearray($dir)
{
while (false !== ($file = readdir($dir)))
{
if (!is_dir($file) && getimagesize($file))
{
$list[] = $file;
}
}
return $list;
}
// This function selects a random image, determines the mime type, opens the file for reading,
// and then outputs the image
function displayrandomimage($list)
{
srand ((double) microtime() * 10000000);
$sig = array_rand ($list);
$size = getimagesize ($list[$sig]);
$fp = fopen($list[$sig], "rb");
if ($size && $fp)
{
header("Content-type: {$size['mime']}");
fpassthru($fp);
exit;
}
}
?>
Step 2:change your images folder like this images>images.png in order for the script to work properly
NOTEi had to make another copy of my gift folder in order for this to work due to the fact that those who had gift sigs from me could still be seen just as a image. but to get it rotating i had to change the folder into a png format to get it to work.
Step3: then paste this code below to get it working. mind you put our own url in their not mine
CODE
[IMG]http://www.saint-michael.trap17.com/gift.png[/IMG]
ON A SIDE NOTE MAKE SURE THE FORUM HAS PHP ACTIVATED OR IT WILL NOT WORK
as you see here im using this as my gift sig rotator
if i have to make any edits i will let you all know.

