I am currently using curl to download json files, the problem I am facing is the time it takes to finish the task. My database has over a 1000 url's that curl has to load and use the result of, how can I do this synchronously with max 10 requests at the same time.
Question: How can I make 10 curl request synchronously?
$query = "SELECT url FROM sources WHERE cached = 0";
$result = $mysqli->query($query);
foreach($result as $url) {
//Make curl request...
}