Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Random sig script

Featured Replies

Since the database is gone (-_-;;)

 

 

 

I can't use search.. On the old scape there was this guy named

 

 

 

Alex -something and he had a random image script. Does anyone have something simmillar (sp?) to that? I'd like my old sigs in a random image script again :)

 

 

 

 

 

 

 

Thanks,

 

 

 

Steph

merciful did have one, not sure if hes still got it, you can pm him and ask :)

www.cutandpastescripts.com << register and u can use the random image thingy there :)

 

 

 

Actually, no you cant. It dosnt display your image size, so it isnt allowed.

~M

Remember.. google is your friend

 

 

 

 

 

 

 




<?php



/*



   By Matt Mullenweg > http://photomatt.net



   Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php



   Latest version always at:



   http://photomatt.net/scripts/randomimage



*/







// Make this the relative path to the images, like "../img" or "random/images/".



// If the images are in the same directory, leave it blank.



$folder = '';







// Space seperated list of extensions, you probably won't have to change this.



$exts = 'jpg jpeg png gif';







$files = array(); $i = -1; // Initialize some variables



if ('' == $folder) $folder = './';



$handle = opendir($folder);



$exts = explode(' ', $exts);



while (false !== ($file = readdir($handle))) {



   foreach($exts as $ext) { // for each extension check the extension



       if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive



           $files[] = $file; // it's good



           ++$i;



           }



       }



   }



closedir($handle); // We're not using it anymore



mt_srand((double)microtime()*1000000); // seed for PHP < 4.2



$rand = mt_rand(0, $i); // $i was incremented as we went along







header('Location: '.$folder.$files[$rand]); // Voila!



?>



 

 

 

 

 

 

 

;)

... except .php sigs no longer work, because they were removed from this version of phpbb ;) (apparently there were security issues)

 

 

 

 

 

 

 

RaenonD has a random signature, that's not .php, but it doesn't display file size, so nobody but him will be allowed to use it :roll:

Since the database is gone (-_-;;)

 

 

 

I can't use search.. On the old scape there was this guy named

 

 

 

Alex -something and he had a random image script. Does anyone have something simmillar (sp?) to that? I'd like my old sigs in a random image script again :)

 

 

 

 

 

 

 

Thanks,

 

 

 

Steph

 

 

 

 

 

 

 

Hehe it was me :)

 

 

 

 

 

 

 

Well since they don't allow php, I don't know what other options there are for making do a random script, unless someone knows how to link to a graphics file and then make it read it as php? Dunno if that's possible?

Upload your sigs here and have it randomise or progress through all your sigs for free.

alexi02.jpeg

I have a script, but it doesn't work here anymore... Kind of disappointing.

peterstretchfn5.gif
  • Author
Remember.. google is your friend

 

 

 

 

 

 

 

-blah-

 

 

 

 

 

 

 

;)

 

 

 

 

 

 

 

Yeah.. except I have no idea how that works. Too bad the php thing doesnt work anymore :( Ill just switch every now and then I guess.

 

 

 

 

 

 

 

Thanks anyway

Bah my poor poor script cant work here no more :'(

 

 

 

I guess ill have to open up notepad and make one that exports to png or something :D lol

612d9da508.png

Mercifull.png

Mercifull <3 Suzi

"We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12

If you change the MIME type on your server so that an image extension is parsed as PHP, it'll work. I did that for my sig.

sigon4.jpg

handed me TWO tissues to clear up. I was like "i'm going to need a few more paper towels than that luv"
... except .php sigs no longer work, because they were removed from this version of phpbb ;) (apparently there were security issues)

 

 

 

 

 

 

 

RaenonD has a random signature, that's not .php, but it doesn't display file size, so nobody but him will be allowed to use it :roll:

 

 

 

 

 

 

 

Do you mean, display the file size to an automated script, or when you right click on it? Because when I right click on it and choose "Image Properties," it comes up with all the stats of the image.

If you change the MIME type on your server so that an image extension is parsed as PHP, it'll work. I did that for my sig.

 

 

 

 

 

 

 

Hmm I've tried putting a .htaccess file in. It works when I put the link in the web browser but doesn't do anything when I put it on these forums.

 

 

 

Are you sending any headers in your file?

Upload your sigs here and have it randomise or progress through all your sigs for free.

alexi02.jpeg

 

If you change the MIME type on your server so that an image extension is parsed as PHP, it'll work. I did that for my sig.

 

 

 

 

 

 

 

Hmm I've tried putting a .htaccess file in. It works when I put the link in the web browser but doesn't do anything when I put it on these forums.

 

 

 

Are you sending any headers in your file?

 

 

 

 

 

 

 

No, I modified it in cPanel so that jpegs are parsed as PHP. I try not to mess with headers whenever I can.

sigon4.jpg

handed me TWO tissues to clear up. I was like "i'm going to need a few more paper towels than that luv"

 

 

 

No, I modified it in cPanel so that jpegs are parsed as PHP. I try not to mess with headers whenever I can.

 

 

 

 

 

 

 

After various tests, I've found that these forums don't like the ? (question mark after the file name, i.e to select the user).

 

 

 

So they only way to have the random script is just to link to the file (e.g .jpg) and not have anything after it = no more random scrips unless I have a file/directory for each user :|

Upload your sigs here and have it randomise or progress through all your sigs for free.

alexi02.jpeg

 

 

 

 

No, I modified it in cPanel so that jpegs are parsed as PHP. I try not to mess with headers whenever I can.

 

 

 

 

 

 

 

After various tests, I've found that these forums don't like the ? (question mark after the file name, i.e to select the user).

 

 

 

So they only way to have the random script is just to link to the file (e.g .jpg) and not have anything after it = no more random scrips unless I have a file/directory for each user :|

 

 

 

 

 

 

 

I know there's something in Apache and PHP where you can have a script generate directories temporarily. See pastebin.com and look at how the URL for each code snippet is - it's a subdirectory. The subdirectories aren't actually there; there virtual and made by the script. You could look at the source. Or switch to CGI.

sigon4.jpg

handed me TWO tissues to clear up. I was like "i'm going to need a few more paper towels than that luv"

 

 

 

I know there's something in Apache and PHP where you can have a script generate directories temporarily. See pastebin.com and look at how the URL for each code snippet is - it's a subdirectory. The subdirectories aren't actually there; there virtual and made by the script. You could look at the source. Or switch to CGI.

 

 

 

 

 

 

 

The webhosting that I have of course won't allow me to edit the Apache config file :/ so I'm just gonna do everything manually.

 

 

 

 

 

 

 

http://forum.tip.it/viewtopic.php?p=54479#54479

Upload your sigs here and have it randomise or progress through all your sigs for free.

alexi02.jpeg

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.