Hi, what is the best way to reliably check if an internet connection is available?
I was using this, but found out today that it returns 1 even if no connection is established:
Code: Select all
online=InternetGetConnectedState_(0,0)
It should return 0 if no connection is established, but it wasn't. My ISP had an outage and even though my router was on, I couldn't connect to any web sites or email or anything. But the code above returned 1 anyway, which is wrong, and I suspect due to my router being powered on.
I'm guessing I should just try to connect to a big web site (Google?) or such, and see if it can be reached?