What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » rotation of avatars

rotation of avatars
Author: Message:
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
RE: rotation of avatars
quote:
Originally posted by traxor
Why don't you just use this script:

code:
<?php
$dir = "imgs";
$dh = opendir($dir);
$files = array();
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
array_splice($files, 0, 2);
srand( (double) microtime()*1000000 );
$key = array_rand($files);
readfile($dir . "/" . $files[$key]);
?>

Make a folder called "avatar" on your server, for example http://skarz.co.uk/avatar/ then in that folder put that code in a .php file (this is where you will link the image to, ie. http://skarz.co.uk/avatar/random.php will go in the avatar url box in the user cp). The images that you want shown should go in the "imgs" folder: http://skarz.co.uk/avatar/imgs.

I doubt it would be that hard to just make seperate folders for different people. You can't be hosting that many people :p.

10-08-2007 05:51 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
rotation of avatars - by Jarrod on 10-08-2007 at 03:14 AM
RE: rotation of avatars - by Spunky on 10-08-2007 at 03:32 AM
RE: rotation of avatars - by WDZ on 10-08-2007 at 04:19 AM
RE: rotation of avatars - by Jarrod on 10-08-2007 at 04:30 AM
RE: rotation of avatars - by markee on 10-08-2007 at 04:37 AM
RE: rotation of avatars - by Jarrod on 10-08-2007 at 04:43 AM
RE: rotation of avatars - by prashker on 10-08-2007 at 05:51 AM


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