how to check if internet is working or not in php code example
Example: php check internet connection
$response = null;
system("ping -c 1 google.com", $response);
if($response == 0)
{
// this means you are connected
}
$response = null;
system("ping -c 1 google.com", $response);
if($response == 0)
{
// this means you are connected
}