Well, to start. You can’t do multi-threads in PHP, and depending on your server ie. Apache. It makes this challenge even harder.
But for long operations that must be ran side by side I devised an approach using multi_curl.
multi_curl allows you to pull remote content side by side. You pass it an array of all the urls and in one go it will process all of them.