Rastgele resim için bunu kullanabilirsin,
resimler diye bi klasör açıp onun içine koyarsan resimleri, oradan rastgele çağırır
<?php
echo '<table cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr>
<td>';
$images = array();
$handle = opendir('resimler/');
while($file = readdir($handle))
{
$extension = substr($file, -4);
if(($extension == '.gif') || ($extension == '.jpg') || ($extension == 'jpeg') || ($extension == '.png') )
{
$images[] = $file;
}
}
$numimages = count($images) - 1;
$randomnum = rand(0, $numimages);
// td close tag is put here so that Explorer doesn't add an extra 2 pixels to the bottom of the image
echo ' <img src="resimler/' . $images[$randomnum] . '" /></td>
</tr>
</table>';
?>