Yngvarr

Generation

generate functionThu, 13 Apr 2023

curl asynchrone pool

//curl asynchronous pool $pool = new CurlPool($max_requests = 10); foreach (range(1, 100) as $index) { $url = "https://www.google.com/$index"; $pool->request($url, function ($content) use ($url) { echo "Loaded $url \n"; }); } $pool->finish();

Questions about programming?Chat with your personal AI assistant