if($_SERVER['QUERY_STRING']) {

echo $_SERVER['QUERY_STRING'];
}