i'm using this three images(1,2,3): (probably gave you broken. visit the site to fix )
,
and lets change them with every refresh! use that:
Code: Select all
<?php
//variable
$id=mt_rand(0,2);
//Tell the browser that we are sending it a PNG image to display
header("Content-Type: image/png");
//Echo with variables!
if ($id==0){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("1.png");
}
elseif ($id==1){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("2.png");
}
elseif ($id==2){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("3.png");
}
?>
and our output is : (refresh to see another)
Code: Select all
(make sure to put the link betwwen [img] and [/img]0
the "mt_rand(0,yournumber)" allows you to have random value between "0" and "yournumber" (if you choose 0 and 12 or anything. that will give one more (13)