Reputation: 4721
Hello is the PHP: curl_multi_select function suitable to execute 1 curl_exec every 10 seconds ? I wanna to execute a culr_exec every 10 seconds and collect the results when finished. I cannot figure out how to start.
Upvotes: 1
Views: 504
Reputation: 2731
I'm leaning towards thinking curl_multi_select() is not what you want to use here. From the docs:
int curl_multi_select ( resource $mh [, float $timeout = 1.0 ] )
Blocks until there is activity on any of the curl_multi connections.
mh - A cURL multi handle returned by curl_multi_init().
timeout - Time, in seconds, to wait for a response.
curl_multi_init() is designed for "the processing of multiple cURL handles in parallel", which is not what you are looking for.
If you need process a curl_exec() every 10 seconds you have a few options:
You could do the latter in PHP, but you'll have to increase your max execution time as you'll hit that relatively quickly.
Upvotes: 1