cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Connections ??

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Feb 2008 18:07:59 +0100 (CET)

On Tue, 19 Feb 2008, Dolan wrote:

> My question was more about connections. Does curl treat getting each URL as
> a connection?

Not necessarily. If you re-use the handle libcurl can re-use an existing
connection, but if you're using URLs from different servers it will of course
use fresh connections for them all.

> And is opening multiple (the way i described in my first email) connections
> the most efficient way to run curl?

When using PHP/CURL you have two options when getting URLs: you either use
that way or you use the multi interface way.

> Where can I read more about multi interface?

The underlying libcurl docs for the multi interface is here:

         http://curl.haxx.se/libcurl/c/libcurl-multi.html

For the PHP docs of the PHP/CURL functions to get to use that interface, I
figure you can start here:

         http://php.net/manual/en/function.curl-multi-exec.php

I haven't found any tutorial-like docs for PHP/CURL stuff on the php site.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-02-19