Page 1 of 1
How to get date modified of a web page (via http)
Posted: Thu Sep 04, 2008 11:22 am
by ale870
Hello, I need to get the modification date (last update) of a web page.
Have you any idea how can I realize that with newLisp?
Thank you!
Posted: Thu Sep 04, 2008 11:51 am
by Lutz
Use either the "header" or "list" option in 'get-url':
Code: Select all
> (get-url "http://www.nuevatec.com" "header")
"Date: Sat, 30 Aug 2008 18:55:50 GMT\r\nServer: Apache\r\nLast-Modified: Fri, 21 Mar 2008 01:39:34 GMT\r\nETag: \"1502b2c-c59-47e311d6\"\r\nAccept-Ranges: bytes\r\nContent-Length: 3161\r\nContent-Type: text/html\r\nAge: 57\r\nConnection: close\r\n\r\n"
>
then look at the Last-Modified header option. Not in all situations this option is reported.
Posted: Thu Sep 04, 2008 1:11 pm
by ale870
It works! Thank you!