I have this URL:
http://www.example.com/get_url.php?ID=100&Link=http://www.test.com/page.php?l=1&m=7
When I print $_GET['Link'], I see only http://www.test.com/page.php?l=1.
Where is &m=7?
If you want to pass an url as a GET parameter, you'll have to URL-encode it.
The problem is, the server sees & as ending the Link parameter. This means you're actually getting:
$_GET['ID'] = '100';
$_GET['Link'] = 'http://www.test.com/page.php?l=1';
$_GET['m'] = '7';
What you want to do is use urlencode. Example:
$link = 'http://sample.com/hello?a=5&b=6&d=7';
$address = 'http://site.com/do_stuff.php?link='.urlencode($link)
External references:
$link = urldecode($_GET['Link']; :)urldecode; that's automatically handled for you by PHP.
&m=7is part of the "main" URLhttp://www.xxx.com/get_url.php...