newLISP Fan Club

Forum => So, what can you actually DO with newLISP? => Topic started by: newdep on March 08, 2004, 09:23:14 AM

Title: 5 Cent tip for today [ check online | offline website ]
Post by: newdep on March 08, 2004, 09:23:14 AM
;

; checks if a list of websites is online | offline.

;



(set 'urls '(

        "newlisp.org"

        "www.gnu.org"

        "wiki.tcl.tk"

        "riki.raki.ro" ))



(define (online? www)

 (if (setq checkup (net-connect www 80 ))

        (begin (net-close checkup ) "Online ") "Offline"))



(dolist (url urls) ( println (online? url) ": " url))



(exit)
Title:
Post by: Ryon on March 10, 2004, 07:31:28 PM
Hey! This is handy. Thanks!