Page 1 of 1

Help with URL containing multiple parameters

Posted: Thu Apr 24, 2008 4:33 pm
by kendhal
Folks - I am a newbie to PHP and have the following problem:

I am writing a redirect script that redirects traffic to different URLs based on the user agent string. I am saving the URLs as variables at the top of the script. The URLs have multiple parameters separated by "&". My problem is that everything after the first "&" is ignored. For example:

$linkone = "http://www.somedomain.com/rd/r.php?id=4 ... 6&c1=link1";

PHP saves this URL in the variable such that it effectively becomes:

"http://affiliate.admtracker.com/rd/r.php?affid=400075"


All I am doing at the end is redirecting to the link variable:
header("Location: ".$linkone);

Thanks!

KD

Re: Help with URL containing multiple parameters

Posted: Fri Apr 25, 2008 2:03 am
by mchaggis
There is nothing wrong with the way in which you are doing it as I use that method all the time.

If you do die("Location: ".$linkone); instead, what does it output? This will determine if there is actually something wrong with your PHP code or if your browser is doing something odd