Send HTTP request from PHP without waiting for response?

后端 未结 10 944
温柔的废话
温柔的废话 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:59

    Came here whilst researching a similar problem. If you have a database connection handy, one other possibility is to quickly stuff the request details into a table, and then have a seperate cron-based process that periodically scans that table for new records to process, and makes the tracking request, freeing up your web application from having to make the HTTP request itself.

提交回复
热议问题