If I want to know whether my pc has access to internet or not, would this be the least expensive but still safe way?
- Code: Select all Expand view
function HasInternetAccess()
LOCAL pSocket
INetInit()
pSocket := INetConnect( "www.google.com", 80 )
lRet := !empty( INetAddress( pSocket ))
INetClose( pSocket )
INetCleanUp()
RETURN
Thanks for any opinion.
I adapted it from xHarbour's INetAddress() documentation