I have some code that does something like this pseudocode:
Use CURL to get site1 into a variable
Use CURL to get site2 into a variable
Use CURL to get site3 into a variable
Use CURL to get site4 into a variable
Do lots of processing on each
Produce output
echo output
Currently this takes a long time occasionally.
I'd like to get the CURL bit to run in parallel so I can get things to speed up.
How do I do that?
I think you are looking for this http://php.net/manual/en/function.curl-multi-init.php parallel cURL requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With