What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help-Random sig

Pages: (3): « First [ 1 ] 2 3 » Last »
Help-Random sig
Author: Message:
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. Help-Random sig
How can I create a random sig? I used to have a .php file that worked great but now it doesnt work for some reason.... [hosting it on my server]
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
07-05-2005 04:33 AM
Profile PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Help-Random sig
what doesn't work with it..?
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-05-2005 04:39 AM
Profile PM Web Find Quote Report
John Anderton
Elite Member
*****

Avatar

Posts: 3908
Reputation: 80
37 / Male / Flag
Joined: Nov 2004
Status: Away
RE: Help-Random sig
Does your server have php 4 / 5 ie is it php 4 / 5 compliant ??
[

KarunAB.com
]

[img]http://gamercards.exophase.com/459422.png[
/img]
07-05-2005 04:43 AM
Profile E-Mail PM Web Find Quote Report
ipab
Veteran Member
*****

Avatar
Design Evolved

Posts: 1017
Reputation: 32
35 / Male / Flag
Joined: May 2004
RE: Help-Random sig
do you have GD and or GD2 libraries installed on your server?
56656E692C 20566964692C 2056696369
07-05-2005 05:17 AM
Profile E-Mail PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Help-Random sig
quote:
Originally posted by ipab
do you have GD and or GD2 libraries installed on your server?
thats not needed....

btw this uses a php5 only function "scandir" so if you dont have php5 ill post the changes for it to work with php4

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


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

//------ dont edit--------
$dir = scandir($folderdir);
$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);


?>


This post was edited on 07-05-2005 at 05:57 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-05-2005 05:56 AM
Profile PM Web Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. RE: Help-Random sig
it has php5 but my other server doesnt...I used to run it on my other server fine...but it doesnt now
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
07-05-2005 04:00 PM
Profile PM Web Find Quote Report
ipab
Veteran Member
*****

Avatar
Design Evolved

Posts: 1017
Reputation: 32
35 / Male / Flag
Joined: May 2004
RE: Help-Random sig
quote:
Originally posted by -dt-
    quote:Originally posted by ipab
    do you have GD and or GD2 libraries installed on your server?


thats not needed....

heh, forgot thats for image manipulation (i.e. adding text to images). :$

quote:
Originally posted by lou_habs
it has php5 but my other server doesnt...I used to run it on my other server fine...but it doesnt now


for php4 I believe the alternative should be opendir instead of scandir


This post was edited on 07-06-2005 at 01:32 AM by ipab.
56656E692C 20566964692C 2056696369
07-05-2005 11:02 PM
Profile E-Mail PM Web Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. RE: Help-Random sig
sorry to be a bit far but where do I save the file for php 4? and who ahs any good scripts to use for the random image itself?
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
07-06-2005 01:05 AM
Profile PM Web Find Quote Report
ipab
Veteran Member
*****

Avatar
Design Evolved

Posts: 1017
Reputation: 32
35 / Male / Flag
Joined: May 2004
RE: Help-Random sig
well if you want a script that is really good, then you should try chameleon (aka ksmas). It is made by a member on this board called keystorm and its really good.
56656E692C 20566964692C 2056696369
07-06-2005 01:34 AM
Profile E-Mail PM Web Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. RE: Help-Random sig
heard of it but was unable to find it...
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
07-06-2005 02:21 AM
Profile PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » 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