Get fullurl untill "?"

I’m using modrewrite in my urls but sometimes add additional variables like this:
mysite.com/ciccms/myname/mypage?test=200

Now, is it posible to get the full url but only until the “?”…

I’m getting the full url with this for now:

echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

Any help is apriciated…

This was actually discussed very recently, have a read through the following thread http://www.sitepoint.com/forums/php-34/getting-full-url-767266.html