本文介绍了什么是比curl快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试建立一个创建域API注册URL的脚本,并通过相应的API发送它们以完成注册。现在我使用curl,每个请求大约需要2秒。

I'm trying to build out a script that creates domain API registration URLs and sends them through the appropriate API to complete the registration. Right now I'm using curl and each request takes roughly 2 seconds. Are there faster languages or methods to doing this vs. using PHP to do the processing.

推荐答案

我曾经处于这样的境地: cURL不是我正在处理的项目的限制的选项。我学习了流,并最终使用类似于本文中的代码。

I was once in a position where cURL was not an option by the constraints of the project I was working on. I learned about streams and ended up using code similar to what is in this article. http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/

这只是另一种方法,我从来没有比较效率。有另一个线索上SO要求一个类似的问题。我假设每种情况在各种情况下都有其优势。

That is only another method, I've never compared efficiency. There is another thread on SO asking a similar question. I would assume that each has its advantages in various circumstances.

Is the PHP CURL api cleaner/faster/better than using streams for HTTP/HTTPS access?

这篇关于什么是比curl快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!