note 13908 deleted from function.parse-url by jimw
| From: | jimw@php.net | Date: | Fri, 21 Dec 2001 00:40:29 +0000 |
| Subject: | note 13908 deleted from function.parse-url by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23664@lists.php.net to get a copy of this message | ||
The parse_url function is great for making sure your users are using SSL connections on servers that
share both secure ports and insecure ports.
<?
$urlarr = parse_url($SCRIPT_URI);
if ($urlarr['scheme'] != "https") {
header ("Location: https://" . $SERVER_NAME . $PHP_SELF);
exit;
}
echo "All secure!";
?>