Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

php - What is faster than curl?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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/

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...