PDA

View Full Version : Banner Rotation Script that isn't a program


Sinistress
05-25-2005, 02:03 PM
Alright,

I'm new to scripts, and I downloaded phpadsnew, took one look at it, and didn't understand a damn thing about it.

I've seen a couple scripts that would be inserted into the HTML code of a site, and have spent enough time looking for one that works that I'm already learning a lot about them... lol

I'm looking for something that will rotate banners about once every 15 seconds or so, versus every page refresh. If anybody knows of a good site that can supply me with this where all I have to do is switch out the image paths & directing urls then that'd be fantastic...

Right now my test site for the banner rotation is this... http://www.sexwithsin.com/teentest1.html ...I got so excited when the banners finally rotated, that I didn't even realize that the url's were not also cycling... LOL

So, if there's any rotation scripts that can be inserted into the HTML like that one is, or else if anybody has any idea how to get the url's to cycle on the script that is on that page, please let me know??

Deviantly yours,
~Sinistress~

Sams
05-25-2005, 05:32 PM
http://phpadsnew.com/two/support-documentation.html
http://phpadsnew.com/two/support-faq.html?section=1

http://forum.phpadsnew.com/index.php?showforum=4

cd34
05-25-2005, 05:37 PM
You could use phpadsnew and run a cron job every minute to write to a set of files that are included via SSI.

You could use phpadsnew as it is intended and insert the ads via javascript or local invocation. I think if you spend the time, you'll find phpadsnew to be relatively easy to use and can probably do exactly what you want.

Natalie and Cleo's contribution to world sanity:
http://www.greenguyandjim.com/board/showthread.php?t=19668

scrm
05-26-2005, 07:02 PM
<script language="JavaScript">

url = new Array;
url[0] = 'http://www.address1.pl';
url[1] = 'http://www.address2.pl';
url[2] = 'http://www.address3.pl';

desc = new Array;
desc[0] = 'Description 1';
desc[1] = 'Description 2';
desc[2] = 'Description 3';

ads = Math.floor(Math.random()*url.length);
document.write('<a href="' + url[ads] + '" target="_blank"><img src="banner' + ads + '.gif" border="0" alt="' + desc[ads] + '"><br>' + desc[ads] + '</a>');

</script>

put this script just in place where you want to show random banners

name the files banner1.gif, banner2.gif, banner3.gif, etc.

you may use this script only once within the one .html file

2msacras
05-29-2005, 10:34 AM
Thanks SCRM...I was looking for a script like that....

Sinistress
05-30-2005, 05:47 AM
Thanks SCRM... playing with it now.