1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Random sigs

Discussion in 'Off Topic' started by Kantham, Feb 24, 2005.

  1. igNiTion

    igNiTion here

    Joined:
    Apr 9, 2004
    Messages:
    2,456
    Likes Received:
    0
    supports jpg, gif, and png only.

    Ok, I still can't get the links to work. Making the tables got the random-ness to work, but sometimes when I go to index.php rather than displaying an image it pops open a download box for "thumbs.db" which is not good. edit - i accidentally uploaded thumbs.db...deleted it. should't do that anymore :)

    I'm still confused about the links though.

    As for the links - is all I have to do type in the name and link in those 2 fields? Because I tried that...and it didn't work :(

    [​IMG]
     
    Last edited: Mar 27, 2005
  2. igNiTion

    igNiTion here

    Joined:
    Apr 9, 2004
    Messages:
    2,456
    Likes Received:
    0
    Ok, seems to be working now, except for a couple things.

    1) the sigs don't change when you refresh the page or whatever and 2) the links are often off, which may be due to the fact that the sig isn't changing when the page is refreshed :p
     
  3. leafo

    leafo spoiled toothpaste

    Joined:
    Mar 29, 2005
    Messages:
    64
    Likes Received:
    0
    Youre making this way to complicated, you need 2 lines of code on a php enabled server to do this:
    Code:
    <?php
    $num=rand(1,5);
    header('Location: http://www.location.com/of/images/'.$num.'.gif');
    ?>
    Just change the location part to where the images are located. The above example was if you had 5 images, you could change the 5 to whatever max you use. You can also change the .gif to whatever type of images you are using. Then just place all the images in the folder specified with numerical names, like 1.gif, 2.gif, etc. Save it as a .php file from notepad and upload.
     
  4. dirtmcgirt

    dirtmcgirt dirtmcgirt

    Joined:
    Apr 5, 2005
    Messages:
    290
    Likes Received:
    0
    can somone tell me of a program other than photo bucket that i can make sigs with?? it has to be free also plz. thats all =]
     
  5. Kantham

    Kantham Fool.

    Joined:
    Sep 17, 2004
    Messages:
    18,034
    Likes Received:
    2
    WTF?

    Photobucket is perfect for image hosting , why changing it
     
  6. Tournament0

    Tournament0 Guest

    :con:
     
  7. Kantham

    Kantham Fool.

    Joined:
    Sep 17, 2004
    Messages:
    18,034
    Likes Received:
    2

    Also , this had nothing to do with Random sigs , please stop asking your question on every forums and thread like that talk about the word ''sig''
     
  8. Kantham

    Kantham Fool.

    Joined:
    Sep 17, 2004
    Messages:
    18,034
    Likes Received:
    2
    I use it for a good while now. I Was wondering somthing. Sometimes the sig don't show up, and sometimes it do.
    Anyone else got this?
     
  9. Kantham

    Kantham Fool.

    Joined:
    Sep 17, 2004
    Messages:
    18,034
    Likes Received:
    2
    apparently java scripts are better...
     
  10. Exodus

    Exodus The liver is evil and must be punished..

    Joined:
    Jul 25, 2005
    Messages:
    27
    Likes Received:
    0
    Could you please just give a brief "tutorial" on how to use this, so to speak? I'm interested in using this on our clan site for my signatures, and I'm just curious on how this would work.

    Much appreciated for any feedback you can give me, kind sir.:)
     
  11. Trentdaddy

    Trentdaddy Interface with me by entering my face.

    Joined:
    Jul 12, 2002
    Messages:
    214
    Likes Received:
    0
    I am thinking that this is working correctly for me. I linked to the .php in my sig and I am getting an image. So far, I haven't seen a different one. I believe there is a certain time setting that changes that right? I found a very simple php line that got it to work. Here (first post) : http://beta.twelvestone.com/forum_thread/view/10203

    This is it:
    Code:
    <?php
    
    
    
    header("Content-Type: image/jpeg");
    
    $sigs = array();
    
    // reference your sig images here
    
    $sigs[] = "http://url.com/sig1.jpg";
    
    $sigs[] = "http://url.com/sig2.jpg";
    
    $sigs[] = "http://url.com/sig3.jpg";
    
    mt_srand((double)microtime()*1000000);
    
    $sig = $sigs[mt_rand(0, count($sigs)-1)];
    
    $im = ImageCreatefromjpeg("$sig");
    
    Imagejpeg ($im);
    
    
    
    ?>
    I assume that the numeric value next to microtime (and the fact that it is microtime and not some other unit or something) affects the time. What i don't know is how long *1000000 in microtime is and what to change it to if I would want to change it.

    EDIT: It doesn't seem to be changing... maybe i need to wait some more.

    EDIT 2: Dang it. I didn't actually change it. I had some personal error. Now it is linked to the php, but it just shows a blank. *sigh* working on it.

    Edit 3: Tried a different one and I though I worked it right (it is in the sig right now), but I'm still getting a blank. I don't want this badly, but I thought this would be relatively easy.
     
    Last edited: Sep 12, 2005
  12. S3NTYN3L

    S3NTYN3L New Member

    Joined:
    Sep 13, 2005
    Messages:
    1
    Likes Received:
    0
    I'm looking for some help with phpMyAdmin.

    I want to create a random sig but I've got NO IDEA how to use this phpMyAdmin thing.

    Can someone PLEASE help me out?
     
    Last edited: Sep 13, 2005
  13. MÆST

    MÆST Active Member

    Joined:
    Jan 28, 2001
    Messages:
    2,886
    Likes Received:
    10
    Got a quick question, forgot exactly whose random script I am using (I've tried a bunch of them), here's what the code looks like if you can recognize it:

    Code:
    <?php
    unset($max, $dir, $handle, $file, $current, $rand);
    $max = 0;
    $dir = getcwd();
    if ($handle = opendir("$dir")) {
    while (false !== ($file = readdir($handle))) { 
    if ($file != "." && $file != ".." && $file != "$PHP_SELF") { 
    $max = $max + 1; } }
    closedir($handle); }
    $rand = rand("1", "$max");
    $current = 0;
    if ($handle = opendir("$dir")) {
    while (false !== ($file = readdir($handle))) { 
    if ($file != "." && $file != ".." && $file != "$PHP_SELF") { 
    $current = $current + 1;
    if($current==$rand) { @readfile("$file"); } } }
    closedir($handle); 
    }
    ?>
    Anyway, my question is if anyone knows how it could be edited so that it could randomly display an image created by another php script in with the rotation. Specifically, I'd like this sig to randomly show up in addition to the usual jpgs and pngs that are in my sigs/random directory.
     
  14. Kantham

    Kantham Fool.

    Joined:
    Sep 17, 2004
    Messages:
    18,034
    Likes Received:
    2
    Man this thread is old.
     

Share This Page