<?php echo rawurldecode(rawurldecode("http://foo.com/bar.php?url=http%253A%252F%252Ffoobar.com%252F"));