<?php
/* make sure user has accessed the page through the SSL URL; the default ports are 80 for normal traffic and 443
for SSL */
if($_SERVER ['SERVER_PORT'] != 443)
{
$secureURL = 'https://secure.bluehost.com/~username'.$_SERVER["PHP_SELF"];
echo
"<h3 style='color:red; text-align:center;'>
You have not connected to this page through the secure (SSL) web address.<br>
Please <a href=".$secureURL.">click here</a> to connect to this page securely.
</h3>";
exit;
}
?>