On my current page, I have a link to the Volunteer Openings page. I’d like to add the date that page was last modified at the end of the link. I tried using $remote and $last_modifed but I get a date in 1970: Volunteer Openings Updated: January 1, 1970. It should be November 2, 2012.
Here is the code I’m using, what am I doing wrong?
<?php /* e.g. volunteer openings Updated: November 2, 2012 */ $response = wp_remote_get('./volunteers/volunteer-openings/'); $last_modified = wp_remote_retrieve_body( $response, 'last-modified' ); echo 'Updated: '. date('F j, Y.', last-modified); ?>
Thanks for your help.
- The topic ‘How do I display a remote file's date last modified?’ is closed to new replies.