check result of curl_exec