First off is you have to have a host that allows php. If you don't have one, I recommend signing up at ********. The only downside of them is that you have a 250 k file size limit. But if they're saved as gifs, that shouldn't be a problem.
1. Make a new directory. Name it something simple like sigs.
2. Upload all the images you want to use into the same directory.
3. Open word pad, and past this into it
Code:
<?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;
}
}
?>
Save it as index.php.
4. Upload it into the directory with the images you uploaded before.
5. Now on the forum, the image tag should look like this.
CODE
[IMG]http.whereyouuploaded.com/sigs/index.php[/IMG]
That's it.