/    Sign up×
Community /Pin to ProfileBookmark

Detect image update and display that time/date?

I originally posted this in the wrong forum…so…here it is in the right place. Help me, php-gurus!

Here’s my scenario. I’d like to be able to upload my webcam image (the name of which will always be webcam.jpg because I don’t know enough php to have fancy coding to change that dynamically for any reason) and have the time and date that I last updated it printed under my little thumbnail picture. I’ve been searching google for information on how to do this, but I’ve found nothing.

Is there a way for a page to detect the time and date that an image was uploaded and then print that out in a specified format? I’m hosted on prohosted.net, and they seem to have all kinds of php and other things enabled and supported (god, I sound like a n00b — I know html and css, I swear! It’s just these newfangled languages that get me!) so if that helps anyone out with what type of code I can use, there you are.

If anyone can point me in the right direction, my eternal thanks.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@jebster1caNov 19.2004 — [URL=http://www.php.net/filemtime]filemtime()[/URL] <-- To get the date/time the file was last modified

[URL=http://www.php.net/date]date()[/URL] <-- To format a date/time

?
×

Success!

Help @dryadsong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...