cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-php mailing list Archives

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET