How to make asynchronous HTTP requests in PHP

Is there a way in PHP to make asynchronous HTTP calls? I don’t care about the response, I just want to do something like file_get_contents(), but not wait for the request to finish before executing the rest of my code. This would be super useful for setting off “events” of a sort in my application, or triggering long processes.

Any ideas?

18 Answers
18

Leave a Comment