Thread: Sig Rotator

Results 1 to 6 of 6
  1. #1
    blahblahz's Avatar
    Join Date
    Jan 2006
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0

    Sig Rotator

    Enjoy Teh TuT
    First off is you have to have a host that allows php. If you don't have one, I recommend signing up at ********. The only downside of them is that you have a 250 k file size limit. But if they're saved as gifs, that shouldn't be a problem.

    1. Make a new directory. Name it something simple like sigs.

    2. Upload all the images you want to use into the same directory.

    3. Open word pad, and past this into it


    Code:
    <?php 
    
    if ($dir = opendir(".")) 
    { 
    $list = buildimagearray($dir); 
    displayrandomimage($list); 
    } 
    
    // This function reads all the files in the current directory and adds all image files to the array $list[] 
    function buildimagearray($dir) 
    { 
    while (false !== ($file = readdir($dir))) 
    { 
    if (!is_dir($file) && getimagesize($file)) 
    { 
    $list[] = $file; 
    } 
    } 
    return $list; 
    } 
    
    // This function selects a random image, determines the mime type, opens the file for reading, 
    // and then outputs the image 
    function displayrandomimage($list) 
    { 
    srand ((double) microtime() * 10000000); 
    $sig = array_rand ($list); 
    
    $size = getimagesize ($list[$sig]); 
    $fp = fopen($list[$sig], "rb"); 
    
    if ($size && $fp) 
    { 
    header("Content-type: {$size['mime']}"); 
    fpassthru($fp); 
    exit; 
    } 
    } 
    ?>


    Save it as index.php.

    4. Upload it into the directory with the images you uploaded before.

    5. Now on the forum, the image tag should look like this.

    CODE
    [IMG]http.whereyouuploaded.com/sigs/index.php[/IMG]



    That's it.
    ,___,
    (O,o) O'RLY?
    /)__ )
    -''-"-

  2. #2
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,703
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    Nice! Gonna give it a try.



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  3. #3
    blahblahz's Avatar
    Join Date
    Jan 2006
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    ^_^ go ahead ill like to see ur result
    ,___,
    (O,o) O'RLY?
    /)__ )
    -''-"-

  4. #4
    Flawless's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    Brink Of Sanity
    Posts
    625
    Reputation
    129
    Thanks
    478
    I'll sticky this one. Seems very useful.

  5. #5
    Bull3t's Avatar
    Join Date
    Jan 2006
    Gender
    male
    Location
    England
    Posts
    1,527
    Reputation
    5
    Thanks
    162
    Yeah, I might use it in my gallery actually





  6. #6
    Mikoll's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    in the niggaz department
    Posts
    1,348
    Reputation
    11
    Thanks
    37
    When I try this it just shows nothing...
    Last edited by Mikoll; 05-15-2006 at 03:11 AM.

Similar Threads

  1. Get Avatars and Sigs!
    By Dave84311 in forum General
    Replies: 25
    Last Post: 05-17-2006, 08:44 PM
  2. i beg of you for a sig!
    By -Avenger- in forum Help & Requests
    Replies: 10
    Last Post: 01-25-2006, 05:23 PM
  3. Sig for me please?
    By Dmx in forum Help & Requests
    Replies: 12
    Last Post: 01-14-2006, 10:55 AM
  4. Photo shop Nub sigs chek um
    By wardo1926 in forum Art & Graphic Design
    Replies: 4
    Last Post: 12-31-2005, 09:39 AM
  5. Couple of Old Sigs
    By fRailty in forum Art & Graphic Design
    Replies: 4
    Last Post: 12-30-2005, 10:11 PM