Partner Twitter Google +
Free subscription articles Dunia-care via mail, join now!

Friday, October 7, 2011

0
How to make Banner rotation in your Site

Do you want to share?

Do you like this story?


You have a site ?? hmm.. i hope is sure i have done to have and have done to built it.. so how about your desain ? yeah everyone like be simple and interesting. But in this section I will to know you how you can make a banner rotation in your  site  You like if like follow this trick ~~~~~~~~~~~~~~~~~~~~~>

Be going to your Cpanel site and take this code include in your site section index.php 
-------------------------------OR------------------------------------------------
Take this code where you want banner rotation action just it is ... and now get the code feel in your site :D

... session_start();

$links = array(
"http://www.google.com",
"http://www.msn.com",

);
//add a new link for the banner to a new line in the same format as above

$images = array(
"http://www.google.co.uk/intl/en_uk/images/logo.gif",
"http://stc.msn.com/br/hp/en-us/css/35/decoration/msn_b.gif",

);//add a new image link for the banner to a new line in the same format as above

//——– DO NOT EDIT BELOW THIS LINE———-
$count = count($links) -1;

$randnum = mt_rand(0,$count);

if ($randnum == $_SESSION['randnum'])
{
$randnum = mt_rand(0,$count);
}
$_SESSION['randnum'] = $randnum;
echo ‘um].’">" src="’.$images[$randnum].’" />’;
 ?>

------------------------------------------OR----------------------------------------



 $Img1 = "http://yoursite.com/image.jpg";
 $Url1 = "http://www.identity.st"; $Img2 = "http://www.hissite.com/bannerA.gif";
 $Url2 = "http://www.about.com";
 $Img3 = "http://hersite.com/MyImage.gif";
 $Url3 = "http://php.about.com";

 $num = rand (1,3);
 $Image = ${'Img'.$num};
 $URL = ${'Url'.$num};   Print "$Image." border=0>";

  .php"); ?>


Okay brother and sister just it is the step or trick I hope you are like this post and give your comment have fun and enjoy ^_^




Related Post:

Entering your email address below, then you will be able to shipment of the latest articles from dunia-care Seomarketing Seomarketingnewsupdate in your inbox:

0 comments:

Post a Comment

 

Search below All of Category your want in this site and thanks for visiting me and follow me

Interesting Info

Customer Service