note 13908 modified in function.parse-url.php by jeroen
| From: | jeroen@php.net | Date: | Mon, 09 Jul 2001 22:46:22 +0000 |
| Subject: | note 13908 modified in function.parse-url.php by jeroen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15136@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!";
?>
http://www.php.net/manual/en/function.parse-url.php.php