2012-11-10, 00:27:26
Yeah my script is a little different but you could simply write a component that does this.
your images would have to be named something with a sequential number range in it.
Or you would have to read the images folder and load the filenames into an array then randomly select an array index based on the length.
using a script as the css background sounds like a good , idea, butit has to send the proper headers or redirect to the image file, and usually you have to deal with paths and having executing code in your uploads folder.
Code:
<style>
whatever {
background-image: url('http://pathtoimage/images/imagename_<?php echo rand(1,100); ?>.jpg');
}
</style>
your images would have to be named something with a sequential number range in it.
Or you would have to read the images folder and load the filenames into an array then randomly select an array index based on the length.
using a script as the css background sounds like a good , idea, butit has to send the proper headers or redirect to the image file, and usually you have to deal with paths and having executing code in your uploads folder.