5 Cent tip for today [ modified? url ]

Started by newdep, March 07, 2004, 01:19:46 PM

Previous topic - Next topic

newdep

Had some good practice from the examples of Nigel, HPW and Lutz so

I hope a more lispy result below ;-)



;

; Returns the modification date of the url

; ...no regex used, slower but readable...

;

; (modified? "http://newlisp.org/download/newlisp_manual.html">http://newlisp.org/download/newlisp_manual.html" )

; (modified? "http://newlisp.org">http://newlisp.org" )

;

; as an extention you could store the output in a local file

; and check the result against the previously checked result.

;        

(define (modified? page, url )

        (slice (set 'url (slice

                 (set 'url (get-url page  "header" ))

                        (find "Last-Modified" url 0))) 0 (find "rn" url)))







Norman.
-- (define? (Cornflakes))