I've never been able to find a good one so i made this little code myself that does the trick:
$cur_place = $_SERVER['PHP_SELF'];
$temp = @$_SERVER['argv'];
$temp = @array_pop($temp);
if ($temp != '') {
$cur_place .= '?' . $temp;
}
unset($temp);
$cur_place will contain the script name (ie: forum.php) along with any arguments (ie: forum.php?board=general&page=3&limit=15)
Hope that helps.