note 68117 deleted from function.parse-url by philip

From: Date: Sat, 17 Oct 2009 15:38:27 +0000
Subject: note 68117 deleted from function.parse-url by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161834@lists.php.net to get a copy of this message
Note Submitter: corgilabs at SPAM_NO_THANK_YOUgmail dot com ---- 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(); } ?>

« previous php.notes (#161834) next »