Saint_Michael 3 Report post Posted September 5, 2005 i was looking sround game renders for filter stuff when i happen to find this script, this script basically reads the files in your folder. without you the user to provide links into the script.step 1: create a index.php file with in your images folder. and then paste this code into it, then save now open the index file in your browser and you should see an image. if not pm or pst here and i will help you out. <?php if ($dir = opendir(".")) { $list = buildimagearray($dir); displayrandomimage($list); } // This function reads all the files in the current directory and adds all image files to the array $list[] function buildimagearray($dir) { while (false !== ($file = readdir($dir))) { if (!is_dir($file) && getimagesize($file)) { $list[] = $file; } } return $list; } // This function selects a random image, determines the mime type, opens the file for reading, // and then outputs the image function displayrandomimage($list) { srand ((double) microtime() * 10000000); $sig = array_rand ($list); $size = getimagesize ($list[$sig]); $fp = fopen($list[$sig], "rb"); if ($size && $fp) { header("Content-type: {$size['mime']}"); fpassthru($fp); exit; } } ?> Step 2:change your images folder like this images>images.png in order for the script to work properlyNOTEi had to make another copy of my gift folder in order for this to work due to the fact that those who had gift sigs from me could still be seen just as a image. but to get it rotating i had to change the folder into a png format to get it to work.Step3: then paste this code below to get it working. mind you put our own url in their not mine[IMG]http://forums.xisto.com/no_longer_exists/; ON A SIDE NOTE MAKE SURE THE FORUM HAS PHP ACTIVATED OR IT WILL NOT WORKas you see here im using this as my gift sig rotatorif i have to make any edits i will let you all know. Share this post Link to post Share on other sites
Saint_Michael 3 Report post Posted September 5, 2005 (edited) -----I merged this post with the above tutorial since this doesn't really stand as a single tutorial, and it can be considered a follow up to this topic/the above tutorial-----szupie <?phpHeader("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");Header("Pragma: no-cache");Header("Content-Type: image/gif");srand((double)microtime()*1000000);readfile("http://forums.xisto.com/no_longer_exists/;here is another script the only downside to this is that you only can sig rotate jpgs and and not png or gifs. well you could just change the jpg into one of them. just follow the same steps in my other sig rotating scripts. Edited September 15, 2005 by szupie (see edit history) Share this post Link to post Share on other sites
lilqb3 0 Report post Posted June 21, 2006 Thanks so much! I've been looking for a script to do this for a while now! Share this post Link to post Share on other sites
ntk100 0 Report post Posted July 10, 2006 Thanx man! you're the Best! Share this post Link to post Share on other sites
Exc 0 Report post Posted August 6, 2006 Wow! Thank you soo much! I have been looking for one of these for ages... The one I used to use went down permanently and I haven't been able to track down another... Share this post Link to post Share on other sites