Page 1 of 1

how ads(.swf files) will display randomly

Posted: Thu Jul 07, 2005 8:13 am
by cnu123
hai friends,
I am developing a site which is display adds in certain places at randomly and rotate with multiple ads.
I want code for this.
It's just like in Yahoo site.
It's urgent.
Plz help me .

Re: how ads(.swf files) will display randomly

Posted: Thu Jul 07, 2005 8:19 am
by Chris Corbyn
cnu123 wrote: I want code for this.
:roll:
cnu123 wrote: It's just like in Yahoo site.
It's urgent.
please help me .
You mean you want someone to write the code for you? What's so urgent about some adverts like Yahoo? Try contacting the groups who produce these adverts. It's called per per click advertsing.

Posted: Thu Jul 07, 2005 9:59 am
by pickle
1) Get a file listing for the directory holding all the ads
2) Transfer that file listing to an array
3) Call array_rand() on that array to get a random item
4) Just saying "I want code for this" generally won't get you much help. Show us what you've got so far and we'll be glad to help.