I am running my code on CodeIgniter - Ubuntu Server.
I have been researching for async ways to run functions.
This is my function:
You have one fork after your pcntl_fork(), check $pid and then you can use it. Repeat for more forks.
For async http requests you can use multicurl: http://php.net/manual/en/function.curl-multi-init.php