What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Random Avatar Cache

PHP Random Avatar Cache
Author: Message:
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
O.P. PHP Random Avatar Cache
code:
<?php
$dir = "imgs"; //The folder where all the images are kept
$dh = opendir($dir);
$files = array();
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
array_splice($files, 0, 2);
$filesnum = count($files);
srand( (double) microtime()*1000000 );
$randnum = rand(0, $filesnum - 1);
header("Location: " . $dir . "/" . $files[$randnum]); //redirects the browser to a random file, allowing it to cache
?>


the images automatically go to the cache, I don't want this to happen... Can somebody edit the code accordingly please? So that it doesn't cache...

:$Not good with PHP:$.
03-23-2005 08:07 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP Random Avatar Cache - by user27089 on 03-23-2005 at 08:07 AM
RE: PHP Random Avatar Cache - by fluffy_lobster on 03-23-2005 at 11:44 AM
RE: PHP Random Avatar Cache - by .Roy on 03-23-2005 at 11:58 AM
RE: PHP Random Avatar Cache - by -dt- on 03-23-2005 at 12:05 PM
RE: PHP Random Avatar Cache - by .Roy on 03-23-2005 at 12:09 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On