Forum Moderators: phranque

Message Too Old, No Replies

Randomly rotating list of ads

Any solutions other than SS?

         

davewray

2:26 am on Oct 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all. I may be exposing my great ignorance of programming with this question, but I've searched high and low and am getting frustrated!

This is what I need to do:

I have several static text ads all lined up in a vertical row on an html page. I was wondering if there was a simple js or similar script (that isn't server side) that I can use to randomly rotate the order of these ads each time the page refreshes.

I'm not interested in MYSQL options or complicated ad rotation scripts...just a simple, in-house solution. Thanks in advance!

Cheers,
Dave

p.s. I wasn't sure where this question should go, so I stuck it here. (It wasn't PHP or MYSQL related).

davewray

2:34 pm on Oct 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess noone knows of any such script. I'm not asking for secrets, just a little help. Anyone?

Dave.

Frank_Rizzo

5:00 pm on Oct 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you don't want to use SS then you have to use something like PHP.

No need for a mysql database, just a txt file will do.

Use PHP to pick a random number and then read the txt file line by line until the line number = the random number. Print that line just read.