tags:

views:

31

answers:

3

hi

how to check whether user connected to internet or not ?

regards

A: 

Errr... More details please ? Give us a context first...

Smoothcity
A: 

First define internet (e.g. sometimes only certain services are accessable, like when only HTTP traffic through a proxy is allowed).

In general, the only somewhat reliable solution is simply to try and check if the targeted service responds.

Marco van de Voort
A: 

What flavor of Pascal are you using? You should have some Internet library available. If you want to know if there's a connection available, the easiest way to do that is to see if you can connect to anything. How exactly you do this depends on your internet library, but if I had to do this I'd simply try to ping google.com and see if it succeeds or not.

Mason Wheeler