View Single Post
  #2  
Old 24th February 2013, 05:11
ndbj ndbj is offline
Senior Member
 
Join Date: Dec 2012
Portugal
Posts: 35
Default
at my include/bittorrent.php, here's what i have:

Code:
$number_banners = 10;
$first = 1;
$random = mt_rand($first, $number_banners);
$banner = "pic/banners/banner$random.png";

?>
<html><head>
and where i want to print the images, instead of:
<img src="<?=$pic_base_url?>banner.png" align=center>

i have this:
Code:
<img src="<?=$banner?>" align=center>
if you saw this line:
$banner = "pic/banners/banner$random.png";
remember, you need to have a folder called pic/banners
and all images there must be .png, named like:
banner1, banner2, banner3......

change this to your needs too
$number_banners = 10;

hope it helps.
Reply With Quote