I am assuming that you want to know if your user is connected to the internet or not ...
I would try to get the HTTP headers from a known stable server (www.sun.com,
www.cnn.com) ... if you get the headers, they are online, if not, they are not ...
you may want to try one or two different servers if the result is negative, just in case the server is down.
Hope this helps