Asynchronous Function Call in PHP

前端 未结 7 1499
逝去的感伤
逝去的感伤 2020-11-30 20:54

I am working on an a PHP web application and i need to perform some network operations in the request like fetching someone from remote server based on user\'s request.

7条回答
  •  春和景丽
    2020-11-30 21:44

    cURL is going to be your only real choice here (either that, or using non-blocking sockets and some custom logic).

    This link should send you in the right direction. There is no asynchronous processing in PHP, but if you're trying to make multiple simultaneous web requests, cURL multi will take care of that for you.

提交回复
热议问题