Help-Random sig |
Author: |
Message: |
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
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]
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 |
|
|
ShawnZ
Veteran Member
Posts: 3146 Reputation: 43
32 / /
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 |
|
|
John Anderton
Elite Member
Posts: 3908 Reputation: 80
37 / /
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 |
|
|
ipab
Veteran Member
Design Evolved
Posts: 1017 Reputation: 32
35 / /
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 |
|
|
-dt-
Scripting Contest Winner
;o
Posts: 1819 Reputation: 74
36 / /
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-.
Happy Birthday, WDZ
|
|
07-05-2005 05:56 AM |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
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
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 |
|
|
ipab
Veteran Member
Design Evolved
Posts: 1017 Reputation: 32
35 / /
Joined: May 2004
|
RE: Help-Random sig
quote: Originally posted by -dt-
quoteriginally 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 |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
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?
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 |
|
|
ipab
Veteran Member
Design Evolved
Posts: 1017 Reputation: 32
35 / /
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 |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
Joined: Aug 2004
|
O.P. RE: Help-Random sig
heard of it but was unable to find it...
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 |
|
|
Pages: (3):
« First
[ 1 ]
2
3
»
Last »
|
|