I am building a desktop application using php and mysql database. Some functions need to be done online while others dont need internet connection. The users use dial up connection.
I was wondering if there is a way I can determine if users are connected to internet to warn them before they use online functions.
You could try to pull an online file for example:
if ( fopen("www.phpbuilder.com", "r"); ) {} else { print "Sorry but you must have a connectionto the internet to perform this function. }
Hope this helps!
Jack.
Tweaked it for ya, should work straight out of the box as long as phpbuilder is online.
<?php if ( @fopen("http://www.phpbuilder.com", "r") ) {} else { print "Sorry but you must have a connectionto the internet to perform this function."; } ?>