Send HTTP request from PHP without waiting for response?

后端 未结 10 940
温柔的废话
温柔的废话 2020-12-08 00:25

I want to have an HTTP GET request sent from PHP. Example:

http://tracker.example.com?product_number=5230&price=123.52

The idea is to d

10条回答
  •  我在风中等你
    2020-12-08 00:54

    You can actually do this using CURL directly.

    I have both implemented it using a very short timeout (CURLOPT_TIMEOUT_MS) and/or using curl_multi_exec.

    Be advised: eventually i quit this method because not every request was correctly made. This could have been caused by my own server though i haven't been able to rule out the option of curl failing.

提交回复
热议问题