CURL ERROR - URL rejected: Malformed input to a URL function