views:

33

answers:

1

Hi,

I'm currently using Curl for PHP a lot. It takes a lot of time to get results of about 100 pages each time. For every request i'm using code like this

$ch = curl_init();

// get source

ch_close($ch);

What are my options to speed things up?

How should I use the multi_init etc>?

+3  A: 
  • Reuse the same cURL handler ($ch) without running curl_close. This will speed it up just a little bit.
  • Use curl_multi_init to run the processes in parallel. This can have a tremendous effect.
Emil Vikström
So in my example?
Kevin
I now use a curl_multi_init for about 10 requests at a time. Takes about 5 for 10 requests =D
Kevin