Jump to content
xisto Community
Sign in to follow this  
link282

Easy Image Rotate Tutorial

Recommended Posts

Well, since I'm new, I don't know what has been posted and what hasn't, so here's an easy-to-use php tutorial!

<?php@header("Pragma: nocache");$URL1="Your Image Source";$URL2="Your Image Source";$URL3="Your Image Source";$URL4="Your Image Source";$URL5="Your Image Source";srand((double) microtime() * 1000);$random = rand(1,5);if($random == 1)@header ("Location: $URL1");elseif ($random == 2)@header ("Location: $URL2");elseif ($random == 3)@header ("Location: $URL3");elseif ($random == 4)@header ("Location: $URL4");elseif ($random == 5)@header ("Location: $URL5");?>

Replace the 'URL1-5' with the image URLs, upload it to a hosting site, and there you go.

If you have more than five images, simply add

$URL5="Your Image Source";
$URL6="Your Image Source";

and

elseif ($random == 5)
@header ("Location: $URL5");
elseif ($random == 6)
@header ("Location: $URL6");

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.