我正在尝试使用 CURL 读取 URL。当我在浏览器中运行此 URL 时,系统会下载一个文件,文件中的内容如下
{"Success":true,"Message":"Success","Response":0.0000}
现在我想获取这个文件的内容。到目前为止,我已经使用了这个-
$send_curl = curl_init($url);
curl_setopt($send_curl, CURLOPT_URL, $url);
curl_setopt($send_curl, CURLOPT_HEADER, false);
curl_setopt($send_curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($send_curl, CURLOPT_POST, TRUE);
curl_setopt($send_curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($send_curl, CURLOPT_HTTPHEADER,array('Accept: application/json', "Content-type: application/json"));
curl_setopt($send_curl, CURLOPT_FAILONERROR, FALSE);
curl_setopt($send_curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($send_curl, CURLOPT_SSL_VERIFYHOST, FALSE);
$json_response = curl_exec($send_curl);
$status = curl_getinfo($send_curl, CURLINFO_HTTP_CODE);
curl_close($send_curl);
$response = json_decode($json_response, true);
但我没有得到适当的回应。知道我哪里出错了吗?