Changed the urldecode back to rawurldecode and used the str replace from toPhpQueryString to fix spaces as a plus sign