Added url parsing with parse_url