PHP gurus, need help (work related)

A General Discussion forum for cars and other topics, and a great place to introduce yourself if you are new to NICO!
User avatar
Dattebayo
Posts: 33288
Joined: Sun Aug 25, 2002 10:04 am
Car: 2004 Nissan Frontier Desert Runner
Location: NE DC

Post

Okay, I know nothing of PHP, but the webhost isn't being cooperative and i need to solve this issue while the web girl is out of town...

We have a website where an image is replaced every 15 minutes with another image that has the same name as it, stored on an FTP server.
Everyone is having problems with the browser caching an old image (and of course they're too lazy to hit "reload"), and it's not the server or a setting on the browser, it's just a latent problem.

So I found this code:

Code: Select all

<?php
print "<img src='http://www.derp.com/now.jpg?".time()."'>";
?>
...and it works great for keeping caching from happening, but I also need the image re-sized to 800x570, and no code I try to add onto it seems to be able to do it on the fly. (Probably because I have no idea how to work the syntax of all that complicated nonsense...)

Anyway, I'd like to get these guys finished so I can move onto better and more interesting projects. Help if you can!


User avatar
Dattebayo
Posts: 33288
Joined: Sun Aug 25, 2002 10:04 am
Car: 2004 Nissan Frontier Desert Runner
Location: NE DC

Post

lol, it's so simple.

Code: Select all

<?php
print "<img width=800 height=570 src='http://www.derp.com/now.jpg?".time()."'>";
?>
It came to me when I was making a sandwich.

User avatar
Kompresshun
Administrator
Posts: 3633
Joined: Sun May 10, 2009 7:41 am
Car: 2020 Nissan Pathfinder SV 4x4, 2017 Ford F150 4x4 SuperCab 3.5L Ecoboost/10AT, 2005 Nissan Pathfinder SE Offroad 5AT
Location: Louisville, KY
Contact:

Post

I was trying to remember it last night when you posted, but I was way too tired... Glad you figured it out.

User avatar
Dattebayo
Posts: 33288
Joined: Sun Aug 25, 2002 10:04 am
Car: 2004 Nissan Frontier Desert Runner
Location: NE DC

Post

It was hoping to get through to you code-heads a lot quicker than I did, for sure. I figured you'd all be high on chocolate covered coffee beans by 2AM...

User avatar
Encryptshun
Posts: 11309
Joined: Mon Jun 04, 2007 7:48 am
Car: 2005 Nissan Xterra
Location: Outside Chicago
Contact:

Post

I read this as "PIIHB gurus, need help (work related)" and came in to offer my professional advice.

I can see that it is not needed.

:whistle:

User avatar
Kompresshun
Administrator
Posts: 3633
Joined: Sun May 10, 2009 7:41 am
Car: 2020 Nissan Pathfinder SV 4x4, 2017 Ford F150 4x4 SuperCab 3.5L Ecoboost/10AT, 2005 Nissan Pathfinder SE Offroad 5AT
Location: Louisville, KY
Contact:

Post

Dattebayo wrote:It was hoping to get through to you code-heads a lot quicker than I did, for sure. I figured you'd all be high on chocolate covered coffee beans by 2AM...
I'm usually at least in bed by 2AM, I try to be asleep by then though. I can't handle the late hours like I used to, i'd like to be in bed earlier than 1AM but it doesn't usually happen :frown:
Encryptshun wrote:I read this as "PIIHB gurus, need help (work related)" and came in to offer my professional advice.

I can see that it is not needed.

:whistle:
:inout:

User avatar
Dattebayo
Posts: 33288
Joined: Sun Aug 25, 2002 10:04 am
Car: 2004 Nissan Frontier Desert Runner
Location: NE DC

Post

Encryptshun wrote:I read this as "PIIHB gurus
:rotfl


Return to “General Chat”