Rotate images

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dss.Lexius
Forum Newbie
Posts: 11
Joined: Fri Jun 11, 2010 12:18 pm

Rotate images

Post by Dss.Lexius »

Hi,

There are 10 images in a folder called "Images".
All images are named like 1.jpg, 2.jpg, 3.gif, 4.png, and so on...

I am using these images on my website with this link: MyDomain.com/Images/1.jpg
Now what i want to do is change the image every minute.

from 1... to ...10 all images one by one, every minute...

Link should remain same, but it should give different image every time.
and if someone copies my link of image, it still gets changed every minute.

i hope to get some help, better with some example code...

Thanks!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Rotate images

Post by requinix »

Use URL rewriting to make those links go to a PHP script instead. The script can then output the right image.

See how far you can get using just Google.
Dss.Lexius
Forum Newbie
Posts: 11
Joined: Fri Jun 11, 2010 12:18 pm

Re: Rotate images

Post by Dss.Lexius »

i need to have an image called 'current.jpg'.
That would obviously be the current image.
but it gets changed with the images from 1 to 10 one by one and over and over again like in loop.
Post Reply