
Code: Select all
<?php
//variable
$id=mt_rand(0,3);
//Tell the browser that we are sending it a PNG image to display
header("Content-Type: image/png");
//Echo with variables!
if ($id==1){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("1.png");
}
elseif ($id==2){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("2.png");
}
elseif ($id==3){
//Echo the contents of the image file called "dogbaby.png" to send it to the browser
readfile("3.png");
}
?>