What are PHP asynchronous processing methods? First, I would like to ask a question. Generally, the bank will notify the other party asynchronously about successful payment orders and how they are implemented .. Assume that after the payment is successful, the successful page is usually displayed to the user immediately, but at this time, the order of another server needs to be notified asynchronously, how can we implement PHP asynchronous processing?
First, I would like to ask a question. Generally, the bank will notify the other party asynchronously about successful payment orders and how they are implemented ..
Hypothesis:
After the payment is successful, the successful page is usually displayed to the user immediately.
However, at this time, we need to notify another server asynchronously that the order has been successfully placed.
How can we achieve this without affecting the prompt display of a successful page?
------ Solution --------------------
However, at this time, we need to notify another server asynchronously that the order has been successfully placed.
Simply a post is not enough? The server reserved the corresponding transfer interface.
...
------ Solution --------------------
PHP's fsockopen () function is asynchronous. In addition, many banking systems are built by Java, and Java's multithreading and other functions are very powerful, better than PHP.
Of course, you can output the user interface and then notify the recipient's server.
------ Solution --------------------
Curl sends the request, and open the interface on the opposite side.
------ Solution --------------------
Php does not have asynchronous mode
Currently, only ajax is asynchronous in web applications.
Request Sent, regardless of the response
It is broadcast, not communication.
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