changing http to https
| From: | David T-G | Date: | Wed, 12 May 2004 16:22:15 +0000 |
| Subject: | changing http to https | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186012@lists.php.net to get a copy of this message | ||
Hi, all --
We have lovely variables like $_SERVER['SCRIPT_URI'] so that we don't
have to hard-code the site or script name into our files, and that's
great; it even includes the SID for me if cookies are off. I'd like to
be able to point someone to https://sitename/script.php to
log in
securely, but I see no way of changing the request method or port number
or such. So far all I've dreamed up is to either manually build
https://{$_SERVER['HTTP_HOST']}{$_SERVER['SCRIPT_NAME']}
or perhaps
str_replace('http','https',$_SERVER['SCRIPT_URI'])
which both seem kinda kludgey.
Any better ideas?
TIA & HAND
:-D
--
David T-G
davidtg@justpickone.org
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!