Presumably you'll use JavaScript to randomly display pictures. But if the image of the data (such as links) is often changed, or by the user modified, increased, how to do? I have a way here.
Put the picture information (such as name, address, link, etc.) in a TXT file (if there is better MySQL, no). HTML file in the JavaScript call PHP program, PHP program randomly read picture data.
Readrand.php (this program is actually generating a JavaScript language)
?
$arrayall =file ("Tp.txt"); read out tp.txt content to array
$arrays =count ($arrayall);
if ($arrays ==1) {//because rand (0,0) is wrong
$selectrand = 0;
}else{
Srand ((double) Microtime () *1000000);/set random number of seeds
$selectrand =rand (0, $arrays-1);
}
$exstr =explode (Chr (9), $arrayall [$selectrand])//randomly remove one and split from all
?>
document.write (' <a href= "; echo $exstr [1];? > "target=" new "> "width=" "height=" "alt=" echo $exstr [0];? > "></a>");
HTML file
<body>
<script language= ' javascript ' src= ' readrand.php ' >
</script>
</body>
(You can put scripty in the position you need, and you can add settimeout () function to achieve timed refresh)