PHP

Determine in php script if connected to internet?

Pinterest LinkedIn Tumblr

Determine in php script if connected to internet?

if(!$sock = @fsockopen(‘www.google.com’, 80))

{

echo ‘Not Connected’;

die();

}

else

{

echo ‘Connected’;

die;

}

?>

Write A Comment

Open chat
Hey Visitor,

How can I help you?