Reputation: 18660
I need to start an asynchronous method call in PHP but have no idea or clue in how to achieve this. The big idea is as follow:
public myfunctionAction() {
// normal flow
// execute the asynchronous call (WS)
// continue normal flow
}
How I do that? Can any provide a simple example just to use as a start point? It's possible to leave the asynchronous call executing on the background and continue the normal flow?
I'm using Symfony 2.6.x as development framework if that helps a little
Upvotes: 0
Views: 77
Reputation: 7785
1 - You can use curl
in php with a low time out
2 - You can use popen to start a batch or script shell without waiting the response : like pclose(popen("ws_start.sh"));
Hope that helps :)
Upvotes: 1