多个https请求..如何? [英] Multiple https requests.. how to?
问题描述
我有一个https API网址,我需要多次运行,并尽快检查域的状态。
I have an https API URL which I need to run multiple times, and as quickly as possible to check the status of a domain.
如何运行相同的 URL ,同时在输出中接收响应,并关闭已完成的连接
How can I run the same URL multiple times concurrently, while receiving the response in output, and closing the finished connection, whilst also keeping memory resources as low as possible?
我被告知要用另一种语言(不是PHP)使用线程?
I was told to use threading in another language (not PHP)?
任何例子或贷款手会非常感谢!感谢
Any examples or lending hand would be greatly appreciated! Thanks
推荐答案
只是做了一个快速的google,想出了这,我相信这将解决你的问题 - 这个报价总结了:
Just did a quick google and came up with this, I believe this will solve your problem - this quote sums it up:
使用curl_multi *系列cURL
函数,您可以同时发出这些请求
。这样,您的应用程序
与最慢请求一样慢,因为
与所有请求的总和相反。
Using the curl_multi* family of cURL functions you can make those requests simultaneously. This way your app is as slow as the slowest request, as opposed to the sum of all requests.
这篇关于多个https请求..如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!