PHP cURL required only to send and not wait for response

前端 未结 6 1862
被撕碎了的回忆
被撕碎了的回忆 2020-12-09 09:11

I need a PHP cURL configuration so that my script is able to send requests and ignore the answers sent by the API.

curl_setopt($ch,CURLOPT_URL,$url);
curl_se         


        
6条回答
  •  伪装坚强ぢ
    2020-12-09 09:33

    How can you tell if the request succeeded or not? You need to wait for at least the status code from the server to determine that. If latency is the issue, look at the curl multi API to perform multiple requests in parallel. You should be able to set a write callback function to abort reception of returned data once the status code has been returned.

提交回复
热议问题