M21 February 2016
PHP generate PNG with dynamic date
I'm looking to generate a .png image with a dynamic date, ex:
take today's date +7 days and create a .png that displays that date.
I'd like to keep the .png name the same and just overwrite once a week, always showing the date + 7 from that one day a week.
Is this possible?
Nathan February 2016
Imagemagick can do this fairly easily and is easy to have it run as a cronjob for automatic generation.
Mark Setchell February 2016
If you have the GNU
date command, you can get the date 7 days from now with:
date -d '+7 days'
You could then pump that, or whatever parts of it you want into the script in my other answer here.
You don't say how you want it formatted, but that script comes up like this:
Asked in February 2016
Viewed 2,732 times
Answered 3 times
Leave an answer
Quote of the day: live life