Maybe something along the lines of:
;; Internet-p - Lee Mac
;; Returns T if internet connection is available
(defun LM:internet-p ( / obj rtn url )
(setq url "http://www.google.com/") ;; url to test
(if (setq obj (vlax-get-or-create-object "winhttp.winhttprequest.5.1"))
(progn
(setq rtn
(vl-catch-all-apply
(function
(lambda ( )
(vlax-invoke obj 'open "GET" url :vlax-false)
(vlax-invoke obj 'send)
(command "_.delay" 200) ;; Increase if slow connection
(vlax-get obj 'status)
)
)
)
)
(vlax-release-object obj)
(if (vl-catch-all-error-p rtn)
(prompt (vl-catch-all-error-message rtn))
(= 200 rtn)
)
)
)
)