Re: Capture the whole URL

From: Date: Fri, 23 Feb 2007 13:17:46 +0000
Subject: Re: Capture the whole URL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-249283@lists.php.net to get a copy of this message
On Feb 23, 2007, at 12:18 AM, Jim Lucas wrote:
diddly.com?id=fred&total=goof
First of forgoing the http:// missing, this still isn't a qualified URL
Yeah, I was just giving an example of what I wanted.
echo $_SERVER['REQUEST_URI']; and see what it returns
I said in the post, it returns an error: "Undefined index." I wonder if this doesn't work on a Wintel server? Is it supposed to return the whole thing?
if for some odd reason that doesn't work try: echo $_SERVER['QUERY_STRING'];
Yes, thanks, that gave me what I wanted, or at least it will together with 'PHP_SELF' that part of the URL that I wasn't getting otherwise.
show us an example of the script that generates the error
I was testing just with simple echo statements.
Looks like you either typed this pretty fast or maybe you had a few typo's. Review your code and check that you are using underscores and not hyphens.
Yes, sorry -- I was both in a hurry (wife "gently" beckoning me to get moving) and drugged up. My code was syntacticly correct. Thank you for your help, Jim. Ken

« previous php.general (#249283) next »