Get Modified Date of Remote File - How?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
rixtertrader
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jul 15, 2019 5:06 pm

Mon Jul 15, 2019 5:29 pm

I did my due diligence by searching on this topic and unable to find an answer. I'm hoping someone here can direct me to where I could find a working solution.

I have a Wordpress page that displays chart image files (.gif) that are updated several times a week.

In the TITLE of the page I want to display the DATE that the file has been updated so my users will know the images have been updated.

My thought is to read the Modified Date of the file and display it in the Title.

PROBLEM: How do you get the Modified Date of a file that is on a different server and all you have is the URL?

TIA
chorn
php-forum GURU
php-forum GURU
Posts: 608
Joined: Fri Apr 01, 2016 2:18 am

Mon Jul 15, 2019 10:25 pm

make a script on your remote server that returns the modified date of the file, or configure your remote webserver to publish this info within the http response header.
rixtertrader
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jul 15, 2019 5:06 pm

Tue Jul 16, 2019 6:17 am

chorn wrote:
Mon Jul 15, 2019 10:25 pm
make a script on your remote server that returns the modified date of the file, or configure your remote webserver to publish this info within the http response header.
Thanks for your suggestion.
This 'remote webserver' is Amazon's AWS S3 storage.
Post Reply