How to make queue requests?

I have a script running in php-cli, there are spinning all the time the eternal cycle - bot VC.

Going to do another query on the API, there is a reference to a function that makes a request to the API.
Now I'm going to do this: let's say every second going all the references in the function and is 1 request
How to make script to wait for the response function and that function has returned each treatment your answer?
June 8th 19 at 16:54
1 answer
June 8th 19 at 16:56
Put in database/cache, then pick up, combine and make a request.

Find more questions by tags PHP