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

curl-and-php

RE: cURL easy in PHP

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 16 Sep 2002 10:27:37 +0200 (MET DST)

On Fri, 13 Sep 2002, wrote:

> > The PHP/CURL module supports those functions, yes, but it uses slightly
> > different names: http://www.php.net/manual/en/ref.curl.php
>
> I assume you mean curl_init(), curl_setopt, curl_exec().
>
> I was hoping to use a persistant connection with the curl_easy functions to
> try to speed retrieval of multpile files from the same host but from within
> a PHP script. From the cURL documentation I gather this can be done by
> reusing the same file handle for subsequent calls to curl_easy_perform()?

Right, libcurl supports re-using of the same handle to achieve persistant
connections etc. But AFAIK, the PHP/CURL module does not offer this (yet).

> When I attempted to reuse the file handle from the PHP curl_init() call
> with a subsequent curl_exec(), resetting the CURLOPT_URL in between for the
> next retrieval, PHP generates an error: Can not reuse file handle.
>
> I thought there should be PHP calls to the specific curl_easy functions
> that allow this since that functionality is available in libcurl 7.7 and
> above? My host currently has curl-7.9.5 istalled with their PHP version
> 4.1.2.

I know there is work in progress to make this available to PHP programmers as
well. I don't know how far it has reach or when anything will be available
though.

I'm quite sure the people who work on that would appreciate all help they can
get.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-09-16