Hello! I am in need of a php image timing script.

Discussion in 'PHP' started by dirge702, Jun 24, 2007.

  1. #1
    OK hello all, I know I just joined today. But this looks like a good php forum. You see what I need, I am the coder for www.shotdownagain.com and I am featured in the comic, it's a webcomic and I am the artist's friend. In the comic, I'm called dirk. Anyways back to the point.

    I have been slowly starting to learn php, it's just taking a long time because there are variables in there, and I absolutely hate variables.

    What I'm planning on doing, is I have two images. a progress bar image and the newest comic image. I am trying to do a php "timing" script so that after a certain amount of time, customizable of course, so that after a certain amount of time, the progress bar will display a a different picture in it, aka the next bar.

    So to once again finalize it, I have 4 progress bars. one for each step of the comic. I am in need of a script that after a certain amount of time, it will display the next image.

    I am sorry if this is the wrong place, I didn't really see another place to put this.

    If you all could help me out, our fans, the creators along with myself will be very thankful.
     
    dirge702, Jun 24, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    progress bar, it's hard to achieve that for a beginner in php :) I don't think someone will post code for your problem, not without a cost. You can try in Sell/Buy section maybe you can find a programmer to do your task.

    I think this can also be done with a small Flash picture player.

    Hopes this help.
     
    gibex, Jun 24, 2007 IP
  3. DopeDomains

    DopeDomains Guest

    Messages:
    207
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There are better solutions to this than PHP. I can't think of a PHP solution (other than HTML timed redcirects, which techinically isn't php) that beats:

    Best solution: Javascript.
    2nd Best: Animated GIF with a delay.

    -Jason
     
    DopeDomains, Jun 24, 2007 IP
  4. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #4
    There is your problem right there. That darn php is full of variables that you have to work with.

    How can you be a coder/scriptor if you absolutely hate variables? That is like saying I can create templates, but I hate to draw.

    I recommend you learn AJAX or javascript and have that do the progress bar instead of php. PHP is a serverside language. What you need is a client side running all the time language. :)
     
    exodus, Jun 24, 2007 IP
  5. dirge702

    dirge702 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Heh yes I do hate variables. A LOT. But you know if you want to get into coding, you're going to encounter variables at least once in any type of code, at least for me I think. And the coding for the site is simple, I used dreamweaver to move it around so I wouldn't have to mess with the variables thankfully. But I do know I will encounter them yet again in another type of code.

    Well thank you all for your posts, I will look around some more and then take your suggestions.
     
    dirge702, Jun 24, 2007 IP
  6. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #6
    exodus, Jun 24, 2007 IP
  7. dirge702

    dirge702 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Well I checked those two out, but they aren't exactly what I'm looking for. for a example of what I'm trying to do, I'll provide links to the images.

    The main bar which shows the latest comic is here.

    http://img98.imageshack.us/img98/8682/25336187hy9.png

    The progress bar is found here.

    http://img508.imageshack.us/img508/6408/32851185iw4.png

    What I'm trying to do, is I have 4 different images to place into the progress bar's blank area, displaying the progress of the comic. For example, after a new one has been released, the progress bar will hold a picture saying "sketching" then after about 2 days, then it changes to a new picture, saying "line art."

    The problem is though, the timer has to be set to about 48 hours till it changes to the new image, and those progress bars simply seem to be something that displays how long it takes a website to load.

    By the way so nobody gets confused, I have 4 "progress bars." they are the same "bar," but each bar has a different progress image. they are already saved with the progress images on it. I am just looking for a timer that after about 24 to 48 hours, it displays the new image.
     
    dirge702, Jun 25, 2007 IP
  8. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #8
    Oh, I am sorry I misunderstood what you needed. What I would do is have a mysql database store the time that the last comic was created. Then have a php script check that time and if a certain time frame has passed then I would have it show which image you needed. I can't look at the images posted at work right now, but I'll take a look when I get home and post back some code possibly for you to look over.
     
    exodus, Jun 25, 2007 IP
  9. dirge702

    dirge702 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks for the response, I await the code :D
     
    dirge702, Jun 25, 2007 IP