View Single Post
Old 2005-05-26, 07:02 PM   #4
scrm
Internet! Is that thing still around?
 
scrm's Avatar
 
Join Date: May 2005
Location: WA, PL
Posts: 8
Send a message via ICQ to scrm
PHP Code:
<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
__________________
best regards,
scream
ICQ#46072336
scrm is offline   Reply With Quote