![]() |
Anyone have a simple banner rotator script available?
I found some online but theyre confusing.
Anyone have a simple one available? also is it better to do it in javascript, or php? I'm guessing javascript. |
|
It's better to use PHP since it's server side. The javascript rotators do not work if the users browser doesn't support/enable javascripting.
I'll make you a custom one that does exactly what you need if you're interested. Contact me and we can talk about it. Thanks, Levi [email protected] aim/icq: 957-413 |
I would also be interested in a simple rotater ...
|
|
Here's a different one. Simple to customize it...
http://javascript.internet.com/misce...ng-banner.html |
Not the cleanest most efficient code, but here
<? $delim = "\n"; $cryfile = "random.txt"; $fp = fopen($cryfile, "r"); $contents = fread($fp, filesize($cryfile)); $cry_arr = explode($delim,$contents); fclose($fp); srand((double)microtime()*1000000); $cry_index = (rand(1, sizeof($cry_arr)) - 1); $herecry = $cry_arr[$cry_index]; echo $herecry . "\n"; ?> random.txt can contain any html.. complete on one line (no empty lines) ie: <a href="http://www.domain1.com"><img src="image1.jpg"></a> <a href="http://www.domain2.com"><img src="image2.jpg"></a> <a href="http://www.domain3.com"><img src="image3.jpg"></a> <a href="http://www.domain4.com"><img src="image4.jpg"></a> etc... |
Code:
<script language="Javascript"> |
Thanks for your help ...
|
i use the script of
http://www.javascript-page.com |
All times are GMT -7. The time now is 05:15 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123