getenv('QUERY_STRING')のことかなと思ったんだけど、
$url = explode("?",$url);
print $url[1];
かもしれない。