Re: Get URL

From: Date: Mon, 16 Oct 2000 23:40:10 +0000
Subject: Re: Get URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20483@lists.php.net to get a copy of this message
Mr Mike: > $url = parse_url(); > echo $url; > would that produce the http://www..... No. parse_url() produces an array. Here's what I do to create a URL string: if ( $SERVER_PORT == 443 ) { $Transport = "https://"; } else { $Transport = "http://"; } $URL = "$Transport$HTTP_HOST:$SERVER_PORT:" . ereg_replace("[^!#-9:;=?-Z_a-z~]", "", substr("$REQUEST_URI", 0, 500)); Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#20483) next »