move parse_url() to utils.php, since it's a standalone utility