NetworkAvailableMBS
if you want to check whether you have a network, than do a DNS resolve:
// two independend domain names
const domain1 = "www.google.com"
const domain2 = "www.macsw.de"
// resolve IPs
dim ip1 as string = DNSNameToAddressMBS(Domain1)
dim ip2 as string = DNSNameToAddressMBS(Domain2)
// if we got IPs and not the same IPs (error/login pages)
if len(ip1)=0 or len(ip2)=0 or ip1=ip2 then
MsgBox "no connection"
else
MsgBox "have connection"
end if
This way you can detect whether you got something from DNS. And you can make sure that a DNS redirection to a login page won't catch you.