checking internet connection
| From: | Simon Wheeler | Date: | Sat, 03 Nov 2001 06:08:01 +0000 |
| Subject: | checking internet connection | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-523@lists.php.net to get a copy of this message | ||
Hi again,
I am working on a download manager for phpdev, basically its there, a PHP-GTK window will check for
an XML file on the server and parse this for a list of updates/adons to phpdev , a clist displays
these and allows you to select a package and then download using the php ftp functions, everything
works so far...
My problem is checking if the user is online, to achieve this I just call a test file on the server
(I am using Snoopy for this to get over any proxy setting problems) now this works in that if the
user is online then my function succsessfully reports this and proceads to download.
If however the user is not online... windows opens a 'connect to the internet' dialog,
which hangs the app whilst connecting, I do not mind this, but if the user chooses
'cancel' from the 'open network connection' dialog the GTK window
'hangs' and has to be shut down forceably, and obviously this is not ideal.
Can anyone suggest a different method for checking the connection status? I can successfully check
if localhost is running by requesting a file with no problems , the problem ocurs when the windows
dialog appears.
Regards
Simon Wheeler.