« CSS Spyglasses | Main | Improved del.icio.us Links »
December 17, 2005
Creative Timestamps
I was updating my website just now and I added a little bit of PHP at the bottom to get the last modified date of the webpage from the server. That way, I could have an automatic "Page Last Updated on .... " message. For some reason my mind clicked over to Wikipedia, and I came up with this...
<?PHP
list($F, $d, $Y) = explode(" ", date("F d Y", filemtime($_SERVER['SCRIPT_FILENAME'])));
echo "Last Updated <a href='http://en.wikipedia.org/wiki/{$F}_{$d}' title='This day in history'>$F $d, $Y<a/>";
?>
Not only will that give you an automatic "Last Updated" message, but it will also link a page with everything that happened in the news on that day.
php | By tylerhall | 02:25 AM
Trackback Pings
TrackBack URL for this entry:
http://chattablogs.com/mt/mt-tb.cgi/28091
Listed below are links to weblogs that reference Creative Timestamps:



