alright well like the title says, I need a banner background image changing script. I tried to change one that I already had to work but for some reason I can't get it to work. The script uses 2 files, one is a counter and the other is the execution of the counter and all. here is the code for the main one: <?php $imagepath = "http://www.floridastreetscene.com/forum/images/nexusblue/banner/fssb-bg";//where images are stored + filename w/o number $sufix = ".jpg"; //sufix (usually the extension of the images) $images = 3; //number of images //---- file management stuff ---- $numberfile = fopen("number.txt","r"); $number=fgets($numberfile,10); fclose($numberfile); $number=$number+1; if($number>$images)$number=0; $numberfile = fopen("number.txt","w"); fputs($numberfile,$number."\n"); fclose($numberfile); header("Cache-Control: no-cache, must-revalidate, no-store"); //force browsers to not cache it header("Location: ".$imagepath.$number.$sufix); //display image ?> Code (markup): The second file is just a simple .txt file that is left editable on the server and this script will write it each time it's accessed and change the display image. Problem is that I'm trying to run it in a table "background image" code. It seems to work alright as it accesses the right image and all but I can't get it to actually change the image displayed. IDK what I'm doing wrong that it wont work.... if you have any thoughts on this or know of something better please do let me know.
I am not sure how much relevant this script is for you but you should have a look at this http://www.htmlbasix.com/banner.shtml
how would I set that up to be in the background of a table though, I want the images to change behind my banner.
I found an incredibly easy to use one: <script language="Javascript"> <!-- // original content taken from Nic's JavaScript Page with permission // lack of these three lines will result in copyright infringment // made by: Nic's JavaScript Page - http://www.javascript-page.com var currentdate = 0; var core = 0; function initArray() { this.length = initArray.arguments.length; for (var i = 0; i < this.length; i++) { this[i] = initArray.arguments[i]; } } link = new initArray( "http://3bgraphics.hypermart.net/", "http://html.digitalsea.net/", "http://www.javascript-page.com/" ); image = new initArray( "http://3bgraphics.hypermart.net/link/3bgraphics.gif", "http://html.digitalsea.net/htmlnow.gif", "http://www.geocities.com/~jsmaster/jsnow.gif" ); text = new initArray( "3B Graphics", "Learn HTML in 7 Easy Steps", "Nic's JavaScript Page" ); var currentdate = new Date(); var core = currentdate.getSeconds() % image.length; var ranlink = link[core]; var ranimage = image[core]; var rantext = text[core]; document.write('<a href=\"' +ranlink+ '\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>'); //--> </SCRIPT> Code (markup): I mean how much more simple could it get? yeah it's random and all but still it works.