Re: note 13908 added to function.parse-url.php
| From: | Jeroen van Wolffelaar | Date: | Mon, 09 Jul 2001 22:49:57 +0000 |
| Subject: | Re: note 13908 added to function.parse-url.php | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-15137@lists.php.net to get a copy of this message | ||
Don't forget the quotes around scheme, it's wrong this way!
----- Original Message -----
From: <bob@negatron.org>
Newsgroups: php.notes
To: <php-notes@lists.php.net>
Sent: Monday, July 09, 2001 11:39 PM
Subject: note 13908 added to function.parse-url.php
> 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
>