Re: HTTP or HTTPS

From: Date: Sat, 05 Apr 2003 22:27:46 +0000
Subject: Re: HTTP or HTTPS
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-142537@lists.php.net to get a copy of this message
So far so good, the next problem is now, that the port changes with every new request. Tried this on my "personal" server an my hoster's one. Perhaps there is another way? JScript, xml or anything other? Thanx so far, Alex "Rasmus Lerdorf" <rasmus@lerdorf.com> schrieb im Newsbeitrag news:Pine.WNT.4.53.0304050954300.2952@DELL... > Presumably you know the HTTPS port on your server. Anything not SSL is > going to be straight HTTP. The point here is that SSL happens a layer > below PHP. PHP doesn't care whether it is running over SSL or not. In > fact it has no idea what transport layer is below it. So your only way to > tell is to depend on whatever the web server tells you. Look at a > phpinfo() for both an SSL and a non-SSL request and see what the > differences are on your server. For me, checking SERVER_PORT has been the > most portable/reliable mechanism. > > -Rasmus > > > > On Sat, 5 Apr 2003, Alexander Weber wrote: > > > But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is not > > really secure. > > > > Alex > > > > "Rasmus Lerdorf" <rasmus@lerdorf.com> schrieb im Newsbeitrag > > news:Pine.WNT.4.53.0304050012100.1060@DELL... > > > I usually just use $_SERVER['SERVER_PORT'] > > > > > > -Rasmus > > > > > > On Sat, 5 Apr 2003, Alexander Weber wrote: > > > > > > > Unfortunally is not set. It's like the variable does not exist, because > > when > > > > I extract the varaible $_SERVER with foreach I don't get HTTPS as key, > > only > > > > SERVER_PROTOCOL. > > > > > > > > I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3. > > > > register_globals OFF > > > > safe:mode OFF > > > > > > > > stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002 > > > > > > > > If you need more info: > > > > > > > > ICQ 46858764. > > > > > > > > Thanx > > > > > > > > Alex > > > > > > > > "John W. Holmes" <holmes072000@charter.net> schrieb im > > > > Newsbeitrag > > > > news:002301c2fa5e$5fb51d10$7c02a8c0@coconut... > > > > > > anybody knows how to find out the connection type (http or httpS)? > > > > > Tried > > > > > > out > > > > > > $HTTP_SERVER_VARS. > > > > > > > > > > $_SERVER['HTTPS'] will be set if it's over HTTPS. > > > > > > > > > > ---John W. Holmes... > > > > > > > > > > PHP Architect - A monthly magazine for PHP Professionals. Get your > > copy > > > > > today. http://www.phparch.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: > > > > http://www.php.net/unsub.php > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#142537) next »