I will make a request through RollingCurl, and for some reason the class performs different requests, but it is necessary to go in turns, how can someone know? here are the requests

    1 answer 1

    Try this -> https://github.com/chuyskywalker/rolling-curl

    $rollingCurl = new \RollingCurl\RollingCurl(); $rollingCurl ->get('http://yahoo.com') ->get('http://google.com') ->get('http://hotmail.com') ->get('http://msn.com') ->get('http://reddit.com') ->setCallback(function(\RollingCurl\Request $request, \RollingCurl\RollingCurl $rollingCurl) { // parsing html with regex is evil (http://bit.ly/3x9sQX), but this is just a demo if (preg_match("#<title>(.*)</title>#i", $request->getResponseText(), $out)) { $title = $out[1]; } else { $title = '[No Title Tag Found]'; } echo "Fetch complete for (" . $request->getUrl() . ") $title " . PHP_EOL; }) ->setSimultaneousLimit(3) ->execute();