Re: Getting whole URL
| From: | Richard Davey | Date: | Tue, 04 May 2004 15:51:56 +0000 |
| Subject: | Re: Getting whole URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185322@lists.php.net to get a copy of this message | ||
Hello I.A.,
Tuesday, May 4, 2004, 4:45:47 PM, you wrote:
IAG> Really simple question- which I can't seem to find anywhere (hey, I am
IAG> blind...) Can I obtain the current URL for the page including query strings
IAG> to the PHP script.
IAG> Say the URL for the page is
IAG> www.blahblahblah.com?blah=blah&blah2=blah2
Various ways, but: $domain = parse_url($_SERVER['HTTP_HOST']); will
probably give you the kind of result you need (see the manual entry on
parse_url to learn which array elements to use).
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html