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 .. ------ Solution ------------------ differences between the three post data methods of curl brainless socket 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.