Sig Rotater?

Discussion in 'GR Classic Archive' started by 1337 Pwn4g3, Aug 3, 2005.

Thread Status:
Not open for further replies.
  1. 1337 Pwn4g3

    1337 Pwn4g3 Well-Known Member

    Posts:
    1,777
    Likes Received:
    0
    Joined:
    May 4, 2005
    What is a sig rotater? How can I get one?
     
  2. bratzer

    bratzer Senior Member

    Age:
    45
    Posts:
    2,637
    Likes Received:
    0
    Joined:
    Jun 9, 2004
    Location:
    Netherlands
    A sig rotator makes your sigs rotated :P Everytime you refresha a page you see another sig (Look at mine)

    What to you need for this?

    1. A host for your sigs.
    2. Host must work with php

    How to set it up?

    1. Upload all the files in a folder on you host.

    2. Copy the next code in a notepad file and save it as: index.php

    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;
    }
    }
    ?>
    3. Now use this in you sig space: [ img]http://www.yoururl.com/***/index.php[ /img]

    Hope this clears it up ;)

    Bratzer
     
  3. 1337 Pwn4g3

    1337 Pwn4g3 Well-Known Member

    Posts:
    1,777
    Likes Received:
    0
    Joined:
    May 4, 2005
    Thanks. Thats kinda confusing but ill get it. Can you post some links to image hosters? Or is it just stuff like Imageshack?
     
  4. Garbs

    Garbs Well-Known Member

    Age:
    36
    Posts:
    73
    Likes Received:
    0
    Joined:
    Jul 25, 2005
    Location:
    Huddersfield, West Yorkshire
    Is there any free hosts that can let you use php ? If there is post the link please.
     
  5. +Rebel+

    +Rebel+ Well-Known Member

    Age:
    35
    Posts:
    705
    Likes Received:
    0
    Joined:
    Aug 2, 2005
    Location:
    St. Louis
    ive looked everywhere before and i nvr found a free host that works with php
     
  6. sirkeith

    sirkeith Senior Member

    Posts:
    524
    Likes Received:
    0
    Joined:
    Jul 9, 2005
    there's also a simple javascript that will do:

    Code:
    <script LANGUAGE="JavaScript">
    var how_many_ads = 2;
    var now = new Date()
    var sec = now.getSeconds()
    var ad = sec % how_many_ads;
    ad +=1;
    if (ad==1) {
    banner="http://www.geocities.com/sirkeith2003/fantasyfinished1.jpg";
    width="500";
    height="90";
    }
    if (ad==2) {
    banner="http://www.geocities.com/sirkeith2003/fp.gif";
    width="500";
    height="90";
    }
    document.write('<center>');
    document.write('<img src=\"' + banner + '\" width=')
    document.write(width + ' height=' + height + ' ');
    document.write('</center>');
    // End -->
    </script>
     
  7. ludjer

    ludjer Well-Known Member

    Age:
    36
    Posts:
    860
    Likes Received:
    0
    Joined:
    May 4, 2005
    Location:
    South Africa
    try free webhosts
    i am sure you will find somthing there
    if you dont try google
     
  8. MwK ZeRo

    MwK ZeRo Member

    Posts:
    5
    Likes Received:
    0
    Joined:
    Apr 9, 2006
    I want to use this method on other forums. Though I don't think that the other forums allow the ".php" at the end. Any way to change this to a image exetension AND keep the script?

    ZERO.

    I am a noob when it comes to coding.
     
  9. Boxiom

    Boxiom Well-Known Member

    Posts:
    3,234
    Likes Received:
    0
    Joined:
    Jan 8, 2005
    Hmm are these allowed on gr?
     
  10. Vpr99

    Vpr99 Senior Member

    Age:
    33
    Posts:
    913
    Likes Received:
    0
    Joined:
    Jul 30, 2005
    Location:
    Fort Collins, Colorado
    I don't know, but probably. It wouldn't take up alot of space in a topic, and it is going to probably be externally hosted.
     
  11. Red Alert

    Red Alert Senior Member

    Posts:
    5,790
    Likes Received:
    0
    Joined:
    Jan 6, 2005
    php sig rotators are allowed on GR
     
  12. McFarlane

    McFarlane Well-Known Member

    Age:
    34
    Posts:
    1,612
    Likes Received:
    0
    Joined:
    Nov 14, 2004
    Location:
    Westbury, New York
    Nice bump, ludjer...
     
  13. Phili G

    Phili G Well-Known Member

    Age:
    35
    Posts:
    1,498
    Likes Received:
    0
    Joined:
    Oct 5, 2005
    Location:
    England!
    What you do is

    make a folder called rot.jpg, then place your index.php and your sigs in
    then when u want to put it on some forums just put

    Code:
    [img]http://yourhost.com/rot.jpg[/img]
     
  14. .euphOria

    .euphOria Well-Known Member

    Age:
    37
    Posts:
    411
    Likes Received:
    0
    Joined:
    Oct 18, 2004
    Location:
    In My Room
    sig rotators are kinda nifty sumtimes
     
  15. SwAT

    SwAT Well-Known Member

    Posts:
    2,689
    Likes Received:
    0
    Joined:
    May 9, 2005
    Location:
    Connecticut, USA
    This topic is nearly a year old, closed. This bump was not needed.
     
Thread Status:
Not open for further replies.

Share This Page