EQ2 Graphics :: Custom EverQuest II Graphics by Seagoat
:: Home :: Queue (7) :: Request :: Tip Jar :: FAQ :: Links :: About :: Contact ::



Randomizing Sigs

Do you have several great sigs? Can you only display one at a time, even though you wish you could use them all?

There's a simple solution: a sig randomizing script! This is a very simple PHP script that will select a random image from a list of image URLs. A different image will display every time the page is refreshed.

In order for this to work:

  1. You MUST have access to a webserver that's capable of executing a simple PHP script (your privately hosted guild website, your personal website, etc.). If you don't know what this means, you don't have one and probably shouldn't bother with the rest of this tutorial. :)

  2. All of your sig images must be uploaded to a webserver somewhere. There are any number of free image hosting websites out there for you to use, if you don't have access to a private server.

  3. Once your images are all uploaded, you should make a list of all the image URLs you want the script to choose from. They should look something like this:
    http://www.your-url.com/folder/imagename1.jpg
    http://www.your-url.com/folder/imagename2.jpg
    http://www.your-url.com/folder/imagename3.jpg

If you're unable to use the information in this tutorial for whatever reason, there are websites out there that will randomize your sigs for you, like this one.
  1. First, open your favorite HTML editing program (or, lacking that, Notepad will work fine).

  2. Create a new (blank) file. Save it as "random.php" in a location that's easy for you to find, like on your Desktop in a folder named "random." (Make sure that nothing else is added to the filename when you save it; "random.php.txt" won't work!)

  3. Highlight, copy, and paste this code into random.php:
    <?php
    $images_array = file('images.txt');
    $image = $images_array[rand(0, count($images_array) - 1)];
    $image = trim($image);
    header("Location: " . $image);
    ?>
    This should be the only code that random.php contains!

  4. Save your changes to random.php.

  5. Create another new (blank) file; save this one as images.txt

  6. In images.txt, place one image URL per line:
    http://www.your-url.com/folder/imagename1.jpg
    http://www.your-url.com/folder/imagename2.jpg
    http://www.your-url.com/folder/imagename3.jpg
    This should be the only text that images.txt contains! You can list as many images as you like; there is no limit.

  7. Save your changes to images.txt.

    Your "random" files should now look like this:
    Desktop
      - random
        - random.php
        - images.txt

  8. Upload your "random" folder to your webserver. You should use the FTP information or tools provided to you by your website hosting company. Again, if you don't know what this means or how to do it, you should try a website that offers to randomize your sig files for you, like this one.
You're all done!

Now, when you want to use your new sig randomizer, type the URL for your script instead of a regular image URL. For instance, instead of:
http://www.your-url.com/folder/imagename1.jpg
...you can use:
http://www.your-url.com/random/random.php
Here's an example:

Normal image code:
<img src="http://eq2.lunaclick.net/galleries/mine/Dionaea_Muscipula_1_500x100.jpg" width="500" height="100" alt="Dionaea Muscipula, Fury of the Halasian Empire" border="0" />

Result:
Dionaea Muscipula, Fury of the Halasian Empire

Random image code:
<img src="http://thehalasianempire.com/random/random.php"
width="500" height="100"
alt="Halasian Empire: Veritable Guild of One" border="0" />

Result:

Click here to reload the above image and see the script in action!
Site design & content copyright © 2006 - 09 Angela Taylor :: All Rights Reserved :: This Page Updated: Thursday, 15 February 2024 @ 05:07:24 UTC :: Load Time: 4.07696 sec