function is_ssl() {
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
return true;
}
return false;
}
$is_ssl = is_ssl();
if ($is_ssl)
{
$hostname = $_SERVER['HTTP_HOST'];
echo "
This is the default SSL vhost for the shared hosting server.
The reason you are seeing this is you are browsing to the site https://$hostname using HTTPS (SSL) however that site ($hostname) does not have SSL enabled !
You can install a self signed certificate for free on your hosting account by following these instructions.";
}else{
echo '