Jump to content

[SOLVED] Internet connection enable or not


Nandini

Recommended Posts

Hi thanx for ur reply.

this is not for website.

the requirement is , i am doing a website. I am giving the facility through localhost to see the website for the users.

when user login into the website, in the homepage  i want to check user system internet connection . If connection enable i have to display as "Your internet connection enabled.". If no "Your internet connection disabled. Please check".

 

How can i do this.

Try this

 

<?php

$File = "http://www.google.com.au/images/firefox/sprite.png";

ini_set('display_errors', 0);

if (!fopen($File, "r")) 
{
echo "Your internet connection disabled. Please check";
} 
else 
{
echo "Your internet connection is enabled";
}

ini_set('display_errors', 1);

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.