The Best Sig Rotation Script Yet - only 9 lines of code!

free web hosting
Open Discussion > Xisto Network Sites > The GFXTrap Forum - Trap17 Graphics Site > Tutorials

The Best Sig Rotation Script Yet - only 9 lines of code!

Avalon
Yes, this is yet another sig rotation sript. It is possibly the simplest one yet being only 9 lines of code. It reads all the graphic files in the current directory and randomly chooses one to display. No need to edit the script as you add and remove sig files, the script will read the file list each time.

Save the code below to a file called index.php and put it in in a directory called randomsig.png along with your sig files.

CODE
<?php Header("Content-Type: image/gif");
$sigarray=array();
if ($handle = opendir("./")) {
 while (false !== ($file = readdir($handle))) {
 if(stristr($file, ".gif") or stristr($file, ".jpg") or stristr($file, ".png")){
 array_push($sigarray,$file);} } }
closedir($handle);
shuffle($sigarray);
readfile(end($sigarray));?>


Then put the following code in your signature block.
CODE
[IMG]http://your.domain.name/randomsig.png[/IMG]

Obviously change 'your.domain.name' to YOUR domain or subdomain name.

Those that know a little about PHP will notice I have not 'seeded' the random number generator, this is because it is not required with the version of PHP used at Trap17.

That's all there is to it, enjoy! smile.gif

Notice from snlildude87:
I am accepting this only because the code is different from the other two sig rotators, but next time, please submit only original IDEAS.

 

 

 


Reply

thablkpanda
Nice one-

Yours doesn't do an anti-cache thinger like mine and nguyen's do though- However for it's simplicity, I'm liking it-

8/10 - Nice work

Panda

Reply

psychiccyberfreak
sweet, thanks for the tut dude.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. signature rotation script - 0.66 hr back. (1)
  2. if (stristr jpg gif - 24.43 hr back. (1)
  3. signature rotate - 32.93 hr back. (1)
  4. video rotate script - 66.42 hr back. (1)
  5. photoshop rotate action or script - 77.52 hr back. (1)
  6. randomsig.png - 82.15 hr back. (1)
  7. rotational sig invisionfree - 83.23 hr back. (2)
  8. fancy image rotation script - 110.42 hr back. (1)
  9. how to forum signature rotate - 114.15 hr back. (1)
  10. rotate forum sig - 164.37 hr back. (1)
  11. php video rotator script - 182.45 hr back. (2)
  12. php rotation script signature - 197.23 hr back. (2)
  13. sig file rotate - 234.78 hr back. (1)
  14. php rotator script - 235.96 hr back. (1)
Similar Topics

Keywords : sig, rotation, script, 9, lines, code

  1. How To Make Scan Lines
    Very useful tip ^_^ (6)
  2. Fancy Lines In Signature
    Adobe Photoshop 7+ (0)
    This tutorial is not mine, it was made by a good friend called Apodae Swift who is letting me repost
    it as long as I give him credit. Tutorial: Fancy lines in signature Program: Adobe Photoshop
    Example: And here is the tutorial. For this example I have used a base background image with
    width 500px and height 100px. It can be easily adapted for other sizes. 1. First thing you need to
    do is get the correct tool. It is normally pre-set as the rectangle tool. As such from the options
    on the top row you need to pick line. Then give it a weight of 0.1cm. 2. When this ....
  3. Dotted Dots/lines. :d
    (0)
    How to make dots like this: See the dots? I'll show you how to do it. /biggrin.gif"
    style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> 1. Select your brush tool
    and pick your color. /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0"
    alt="biggrin.gif" /> 2. In the top right corner, you should see a tab that says "Brushes". It should
    be gray. Click it. 3. Copy these settings: Tada! Don't worry, your brushes wont stay
    like that. You can modify the Spacing percent all you want. /biggrin.gif" style="vertical-align:mi....
  4. Another Sig Rotation
    even better then snlil's :P XP (-1)
  5. Another Sig Rotation
    even better then snlil's :P XP (5)
    i was looking sround game renders for filter stuff when i happen to find this script, this script
    basically reads the files in your folder. without you the user to provide links into the script.
    step 1: create a index.php file with in your images folder. and then paste this code into it, then
    save now open the index file in your browser and you should see an image. if not pm or pst here and
    i will help you out. QUOTE if ($dir = opendir(".")) { $list =
    buildimagearray($dir); displayrandomimage($list); } // This function reads all the ....
  6. Make Dashed Lines In Photoshop
    (3)
    Just thought I'd show you all how to make dashed lines ( _ _ _ _ _ _ ) in an easy way. Just
    follow these simple steps: 1) Start with making a new canvas (1x10 pixels). 2) Grab the
    rectangular marquee tool and select everything except the the first and last pixel. Zoom up close to
    see (use the grids if that helps you). 3) Select the paint bucket tool and fill the selection with
    your chosen colour. 4) Now go Select -> All , and Edit -> Define Pattern . 5) Now you can
    open the image where you want dashed lines. Make a selection where you want the line to app....
  7. Making Matrix Code Using Photoshop
    (3)
    1) Open a new file,choose any size. Make the background white. 2) Go to Filter>Texture>Grain, like
    the following: 3) Go to Filter>Artistic>Neon Glow, like the following: 4) Go to
    Filter>Stylize>Glowing Edges, like the following: The end, choose whatever colour u want but if
    you want propal matrix try that and it will lok good /wink.gif' border='0'
    style='vertical-align:middle' alt='wink.gif' /> ....

    1. Looking for sig, rotation, script, 9, lines, code

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for sig, rotation, script, 9, lines, code

*MORE FROM TRAP17.COM*
advertisement



The Best Sig Rotation Script Yet - only 9 lines of code!



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE