php check internet connection
$response = null;
system("ping -c 1 google.com", $response);
if($response == 0)
{
// this means you are connected
}
php check internet connection
$response = null;
system("ping -c 1 google.com", $response);
if($response == 0)
{
// this means you are connected
}
php check internet connection
function is_connected()
{
$connected = @fsockopen("www.example.com", 80);
//website, port (try 80 or 443)
if ($connected){
$is_conn = true; //action when connected
fclose($connected);
}else{
$is_conn = false; //action in connection failure
}
return $is_conn;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us