vBulletin - Debt Consolidation - Moroccan Property - Debt Consolidation - Web directory

PDA

View Full Version : Looking for a special Image Rotator Script...Help me out, for GREEN REP


DidierE
Jul 30th 2007, 1:56 am
Okay i'm looking for a standalone script like this site offers: http://www.imagerotation(dot)com

Basically what I wanna do is put an image on my site that randomly changes to another image after each week

I searched hotscripts and others but can't really find what i'm looking for.
Most of the scripts i found display random images on page refresh or refresh the images every x-seconds when browser window is still open, but it's not what i'm looking for.

So I want some script that changes the image weekly without the user having to keep his browser window open for a week.

Maybe something with mysql and weekly cron job?

Let me know if you have a solution for my problem
Will give Green rep if you can help me! ;)

nico_swd
Jul 30th 2007, 2:12 am
Well, the easiest way would be this:

You name your images by the number of each week. Eg: 32.jpg (This would be the image for week number 32), and then you do:


<img src="/path/to/images/<?php date('W'); ?>.jpg" />

DidierE
Jul 30th 2007, 2:42 am
Thanks Nico!
I can't believe it was going to be that simple.

Green rep added!

Thanks a million, you saved me hours of searching time ;)

VimF
Jul 30th 2007, 2:59 am
I just want to add that you also need (at least) 52 images for it to work correctly.

DidierE
Jul 30th 2007, 3:11 am
I just want to add that you also need (at least) 52 images for it to work correctly.

Yep, I made 55 just to make sure :D

nagasharmi
Jul 30th 2007, 3:12 am
better you will try this following

First you have stored that Whatever images needed.
whenever it change note it current date and give change date
when you change date will come means automatically get from database.



try it i am sure