note 68117 added to function.parse-url

From: Date: Thu, 13 Jul 2006 18:59:41 +0000
Subject: note 68117 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-114743@lists.php.net to get a copy of this message
I hope this is helpful! Cheers! -eo <? # Author: Eric O # Date: July 13, 2006 # Go Zizou!! :O) # Creating Automatic Self-Redirect To Secure Version # of Website as Seen on Paypal and other secure sites # Changes HTTP to HTTPS #gets the URI of the script $url = $_SERVER['SCRIPT_URI']; #chops URI into bits BORK BORK BORK $chopped = parse_url($url); #HOST and PATH portions of your final destination $destination = $chopped[host].$chopped[path]; #if you are not HTTPS, then do something about it if($chopped[scheme] != "https"){ #forwards to HTTP version of URI with secure certificate header("Location: https://$destination"); exit(); } ?> ---- Server IP: 216.194.113.175 Probable Submitter: 24.251.83.35 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.parse-url.php Edit -- http://master.php.net/note/edit/68117 Del: integrated -- http://master.php.net/note/delete/68117/integrated Del: useless -- http://master.php.net/note/delete/68117/useless Del: bad code -- http://master.php.net/note/delete/68117/bad+code Del: spam -- http://master.php.net/note/delete/68117/spam Del: non-english -- http://master.php.net/note/delete/68117/non-english Del: in docs -- http://master.php.net/note/delete/68117/in+docs Del: other reasons-- http://master.php.net/note/delete/68117 Reject -- http://master.php.net/note/reject/68117 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114743) next »