different sig picture everytime u refresh

the_music_man

aka prodj88 =P
Joined
2 Jul 2002
Messages
2,401
hey you guys. i have a few penguin icons and i want it in my sig so that everytime u refresh its something different from the last time. so if anyone could tell me how this is done i would appreciate it. and will photobucket work or will i need something more advanced for my web host?
 
On a few other forums I have mine so it does - what you need is a random image generator, which you just drop into the directory with the pictures you want in. However, you will need a proper host with php support, and this forum doesn't allow html in sig/avatar (both of which I have on rotating on some other forums).
 
There was actually a post on how to do it once.. not sure where that's disspeared to :confused:
 
you need some webspace which handles PHP, stick this code in a file called index.php and put it in a directory with your sigs, then link to that file in you sig
Code:
<?php
ob_start( 'ob_gzhandler' );
srand( time() );
$files = array();
if ($dir = @opendir(".")) {
while (($file = readdir($dir)) !== false) {
if ( eregi( '.(jpg|gif)$', $file ) ) {
$files[] = $file;
}
} 
closedir($dir);
}
$file = $files[rand() % sizeof( $files )];

if ( eregi( '.jpg$', $file ) ) {
header( "Content-Type: image/jpeg" );
} else {
header( "Content-Type: image/gif" );
}
header( "Content-Length: " . filesize( $file ) );
readfile( $file );
?>
 

Members online

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back