How could I know the creation or modification date of an image found in a url? Example: I have the url of this image:
https://newrelic.com/assets/pages/apm/php/php-elephant-logo-bd4f9d83be8c8563248fe4793f90bae7.png
and I want to know its creation date, and I had been using the function filectime()
but it always returns 12/31/1969 18:00
Thank you
To obtain the last date of modification of the image you could obtain the headers of the url in question, within these you will find
Last-Modified
that it is the last date of modification of the image. For this you must use the function get_headers()In code it would be something like this:
EDIT
To change the date format you can do it as follows: