/ Published in: PHP
**Example of use:**
$bIsConnected = check_internet_connection();
$sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.';
echo $sText;
$bIsConnected = check_internet_connection();
$sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.';
echo $sText;
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Check Internet Connection. * * @author Pierre-Henry Soria <[email protected]> * @copyright (c) 2012-2013, Pierre-Henry Soria. All Rights Reserved. * @param string $sCheckHost Default: www.google.com * @return boolean */ function check_internet_connection($sCheckHost = 'www.google.com') { } ?>