5 Cent tip for today [ check online | offline website ]

Featuring the Dragonfly web framework
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

5 Cent tip for today [ check online | offline website ]

Post by newdep »

;
; 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)
-- (define? (Cornflakes))

Ryon
Posts: 248
Joined: Thu Sep 26, 2002 12:57 am

Post by Ryon »

Hey! This is handy. Thanks!

Locked