detect internet connection using php in all files code example
Example: check network connection php
$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
}