Thanks for that! It might help, though reassembling all the right parameters in the right order would be a real pain. I don't suppose you know if the parameters are ordered in the same sequence they appear in the address bar? If they are, an implode() might possibly work? Or maybe not, as there are different delimiters between different parts of the URL, and things like "main_page=" would also have to be added back in.