Constant Changing Images

BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
edited June 2005 in Off-Topic
<div class="IPBDescription">Specifically, Forum Signatures</div> <img src='http://www.tacticalgamer.com/sig/signature.jpg' border='0' alt='user posted image' />
I took that signature, as it was the first I saw when I remembered. Basically, I was wondering how I would go about doing what he did - making a .jpg refresh every time the client downloads it again.

I have a web host and a domain, so I'm set there - I just need to know the script, or how to make it dynamically update (according to a timer, let's say, or a random number - so when people refresh, they see a different image).

I'm thinking of doing this for my own signature, so that when people refresh the page, or see a differnet post by me, I'll have a different signature (and/or avatar for that matter).

Edit: I remember someone recently did this, where everyone submitted a random phrase and when you refreshed the page, you would see a different phrase that was submitted.

Edit 2: Found the guy = <a href='http://www.unknownworlds.com/forums/index.php?showuser=24475' target='_blank'>Curve</a>.

Comments

  • douchebagatrondouchebagatron Custom member title Join Date: 2003-12-20 Member: 24581Members, Constellation, Reinforced - Shadow
    wouldnt that require a flashbased sig?
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
    <!--QuoteBegin-6john+Jun 12 2005, 09:42 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (6john @ Jun 12 2005, 09:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> wouldnt that require a flashbased sig? <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    I'm sure you can do it with a PHP Script - all I've found is the rotator script, which I didn't find worked for me...
  • MedHeadMedHead Join Date: 2002-12-19 Member: 11115Members, Constellation
    I'm not sure if the forum allows it. Most have to set the image with a .php extension, which may not be an allowed image extension (even if it changes to the image upon load). I don't know though, so I won't speak for the admins (they don't like that).

    Regardless, a quick Google search turned up this: <a href='http://automaticlabs.com/products/rotator' target='_blank'>http://automaticlabs.com/products/rotator</a>
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    edited June 2005
    <img src='http://s93553449.onlinehome.us/sigs/random.jpg' border='0' alt='user posted image' />

    Like so?

    random.jpg is actually random.php There's a file called .htaccess that fools the server into thinking that the php file in that directory is actually a jpg file.

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->RewriteEngine On
    Redirect /sigs/random.jpg http://s93553449.onlinehome.us/sigs/random.php<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    Here's the random.php btw
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--><?php
    $image_array = array('1.jpg','2.jpg','3.jpg','4.jpg','5.jpg');
    $image_filetype_array = array(0, 0, 0, 0, 0);
    // 0=jpg, 1=gif, 2=png etc
    $length = count($image_array);
    $random_image = rand(0, $length);
    //checks filetype, sets
    if($image_filetype_array=0){
    Header ("Content-type: image/jpg");
    }
    if($image_filetype_array=1){
    Header ("Content-type: image/gif");
    }
    if($image_filetype_array=2){
    Header ("Content-type: image/png");
    }
    //prints
    $image_name = $image_array[$random_image];
    $image = @readfile($image_name);
    print $image;
    ?><!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
    edited June 2005
    Found the guy = <a href='http://www.unknownworlds.com/forums/index.php?showuser=24475' target='_blank'>Curve</a>.

    Edit: So Caboose, just add that bit to my server's files, and I'm set to go? Thanks for the help <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    you of course need to set it up to redirect to the right place though.
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
    edited June 2005
    <!--QuoteBegin-Caboose+Jun 12 2005, 09:47 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Caboose @ Jun 12 2005, 09:47 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->RewriteEngine On
    Redirect /sigs/random.jpg http://s93553449.onlinehome.us/sigs/random.php<!--c2--></td></tr></table><div class='postcolor'><!--ec2--> <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    Do I have to include the full URL, or can I just use a directory format, like "/sigs/random.jpg"?

    Example:
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->RewriteEngine On
    Redirect /sigs/random.jpg /sigs/random.php<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
  • HazeHaze O RLY? Join Date: 2003-07-07 Member: 18018Members, Constellation
    Wow.. thats nifty.
  • BreakthroughBreakthrough Texture Artist (ns_prometheus) Join Date: 2005-03-27 Member: 46620Members, Constellation
    Okay, I think I got it - thanks for all the help, <b>Caboose</b>!
  • Nil_IQNil_IQ Join Date: 2003-04-15 Member: 15520Members
    Hmm, this might finally stop Condizzle from stealing my sig every time my back is turned...

    As you can see, I came up with a different solution in the meantime <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
  • PetcoPetco Join Date: 2003-07-27 Member: 18478Members, Constellation
    <!--QuoteBegin-Nil IQ+Jun 13 2005, 02:44 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Nil IQ @ Jun 13 2005, 02:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hmm, this might finally stop Condizzle from stealing my sig every time my back is turned...

    As you can see, I came up with a different solution in the meantime <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Heh I thought you were condizzle for a second.
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    Yea, me too <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    Waah. Stop it. It's like The Matrix 2 all over again...
  • lolfighterlolfighter Snark, Dire Join Date: 2003-04-20 Member: 15693Members
    Three people, one sig. All things aside, this is pretty entertaining.
  • Cold_NiTeCold_NiTe Join Date: 2003-09-15 Member: 20875Members
    <!--QuoteBegin-lolfighter+Jun 14 2005, 01:54 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (lolfighter @ Jun 14 2005, 01:54 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Three people, one sig. All things aside, this is pretty entertaining. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    4 people, counting Condizzle himself. He's losing big time right now. I wonder if he has any way to take the fight back to them?
  • PetcoPetco Join Date: 2003-07-27 Member: 18478Members, Constellation
    edited June 2005
    Condizzle will fall victim to the sig stealers! Remember this is impersonate condizzle month.
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    Your sig is still up... hmm..
  • Cold_NiTeCold_NiTe Join Date: 2003-09-15 Member: 20875Members
    edited June 2005
    <!--QuoteBegin-Petco+Jun 14 2005, 11:20 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Petco @ Jun 14 2005, 11:20 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Condizzle will fall victim to the sig stealers! Remember this is impersonate condizzle month. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    You should really fix your sig.

    ::EDIT::
    Do the avatar as well.
  • PetcoPetco Join Date: 2003-07-27 Member: 18478Members, Constellation
    Time to h4x more sigs from him <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo--> .
Sign In or Register to comment.