Curl error: URL rejected: Malformed input to a URL functionNADA