I just want to write a php code to check if password protected website is online or offline. I know the code to check whether if website is online or offline but it is not working if the website is password protected through .htaccess. llike if you open then website then an alert box comes and ask about the user name and password. If i use this code then it is just saying that the website is offline because it cannot by pass the user name and password.
$host = 'http://gforms.orbnexus.com';
if($socket =@ fsockopen($host, 80, $errno, $errstr, 30)) {
echo 'online!';
fclose($socket);
} else {
echo 'offline.';
}
Can any one please help me? Is there any way to by-pass user name and password?