-1

I'm looking for a way to do asynchronous GET requests in PHP with callbacks, similar to JavaScript's fetch API:

fetch(url).then(Response => Response.text()).then(console.log);

I'm trying to do it like this:

aysnc_gets($urls_array, {echo $result;});

Or I could make a single async request at a time with a simple loop.

I've looked all over and found nothing that works. How would I do this?

RedGuy11
  • 344
  • 6
  • 14
  • Does this answer your question? [How to make asynchronous HTTP requests in PHP](https://stackoverflow.com/questions/124462/how-to-make-asynchronous-http-requests-in-php) – Felippe Duarte Jan 21 '21 at 19:48
  • @FelippeDuarte No. See my comments on each answer there. – RedGuy11 Jan 22 '21 at 01:20
  • You mean comments like _“I don't understand this at all...”_? Yeah, those are really helpful. Plus, please don’t direct us to _other_ questions, to gather your requirements from various comments strewn all over the place there. Make your own question self-contained - explain what you already tried, and what your specific requirements are, _here_. – CBroe Jan 22 '21 at 14:31