I'm using PHP $_GET to get a URL from a URL variable like so:
echo 'URL: ' . $_GET['url'];
When I get a regular URL it echos fine, for example:
http://localhost?url=http://google.com
The output is:
URL: http://google.com
But if the URL contains multiple variables, they get cut off, for example:
http://localhost?url=http://google.com?id1=55&id2=88&id3=99
Will return:
URL: http://google.com?id1=55
If there any way around this so I can get the URL regardless of what it contains? e.g. so it returns:
URL: http://google.com?id1=55&id2=88&id3=99
Updated, in response to Yuu:
$url = $_GET['url'];
$parse = parse_url($url);
$replace_old = array($parse['host'],'http://');
$replace_new = array("","");
$url_vars = str_replace($replace_old,$replace_new,$url);
echo $parse['host'] . htmlentities($url_vars);