What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » crystal/glassy icons

Pages: (2): « First « 1 [ 2 ] Last »
crystal/glassy icons
Author: Message:
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
34 / Male / –
Joined: Jun 2004
RE: crystal/glassy icons
quote:
Originally posted by Methos2
??? im rubbish at php by the way, do you mean change
code:
$folderdir = "./images"; //EDIT THIS
$types = array('jpeg','.png','.bmp','.jpg','.gif');


to this...

code:
$folderdir = Header("Location: $imageurl");
$types = array('jpeg','.png','.bmp','.jpg','.gif');


???

nah i was refering to how the image is outputed

code:
<?php
error_reporting(E_ALL ^ E_NOTICE);


$folderdir = "./images"; //EDIT THIS
$types = array('jpeg','.png','.bmp','.jpg','.gif');

//------ dont edit--------
$dir = array();
$folder=opendir($folderdir);
while ($file = readdir($folder)) $dir[] = $file;
closedir($folder);
$files = array();
for ($i=0;$dir[$i];$i++){
$ext=strtolower(substr($dir[$i],-4));
if (in_array($ext,$types)){
$files[]=$dir[$i];
    }
}

$image =  $files[rand(0,count($files)-1)];
$ext=strtolower(substr($image,-4));
$ext = str_replace('.','',$ext);

Header ("Content-type: image/$ext");
readfile($folderdir . '/' .$image);

header("Location: " . $folderdir . "/" . $image);

?>
11-17-2005 07:20 PM
Profile PM Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
O.P. RE: crystal/glassy icons
ah okies, changing.... thanks!
formerly methos
11-17-2005 08:05 PM
Profile PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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