Differences between php three post data methods Curl, socket, file_get_contents what are the differences between the three methods must be added with stream_set_blocking to achieve the need to wait for immediate response results? Under what circumstances is the method used? has anyone summarized it? thank you... the difference between the three post data methods of curl brainless s php?
Php three post data methods Curl, socket, file_get_contents what is the difference
Do I have to add stream_set_blocking to all three methods to achieve this without waiting for immediate return results?
Under what circumstances is the method used? has anyone summarized it? thank you ..
------ Solution --------------------
Curl brainless
Socket brain
File_get_content + stream_context_create
Stream_set_blocking is used to set the file descriptor to be non-blocking. it can act on regular files and socket streams. unless you use select + socket, it will not be helpful for PHP programming. maybe you are expecting stream_set_timeout.
------ Solution --------------------
Discussion
1. PHP sends an email. because it takes some time to send the email, I don't need to get the returned result. I will immediately prompt the user that the email has been sent successfully.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service