Re: php curl extension

From: Date: Mon, 02 Jul 2007 08:06:08 +0000
Subject: Re: php curl extension
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-30400@lists.php.net to get a copy of this message
On 30.06.2007 09:54, Andrey A. Belashkov wrote:
Hello! Can you add please CURLOPT_PRIVATE and CURLINFO_PRIVATE text parameters to curl extension for php like CURLOPT_URL ?
In which cURL version were they introduced?
Diff file for ext/curl/interface.c: ----------------------------------------------------------------------- --- interface.c Tue May 22 08:39:20 2007
+++ php.5.2.3.interface.c       Sun Jun 17 16:08:17 2007
@@ -355,6 +355,11 @@
        le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl",
module_number);
        /* Constants for curl_setopt() */
+
+       REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE);
+       REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE);
+
        REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
        REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
        REGISTER_CURL_CONSTANT(CURLOPT_PORT);
@@ -1299,6 +1304,7 @@
                        }
                        error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
                        break;
+               case CURLOPT_PRIVATE:
                case CURLOPT_URL:
                case CURLOPT_PROXY:
                case CURLOPT_USERPWD:
@@ -1803,6 +1809,7 @@
                option = Z_LVAL_PP(zoption);
                switch (option) {
                        case CURLINFO_EFFECTIVE_URL:
+                       case CURLINFO_PRIVATE:
                        case CURLINFO_CONTENT_TYPE: {
                                char *s_code = NULL;
----------------------------------------------------------------------- Thanks. --------------------------------------------------------------
    _
   . .      Best Regards, Andrey A. Belashkov,
 /  v  \    UNIX system & network Administrator. AAB56-RIPE ICQ: 8229031
/(     )\   My resume you can see on http://virus.org.ua/resume/
^^ ^^
-- Wbr, Antony Dovgal

« previous php.internals (#30400) next »