note 13908 added to function.parse-url.php

From: Date: Mon, 09 Jul 2001 21:39:04 +0000
Subject: note 13908 added to function.parse-url.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15134@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

« previous php.notes (#15134) next »