Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...