# php curl extension

- Thread: https://externals.io/message/30374
- Original archive: https://news-web.php.net/php.internals/30374
- Started by Andrey A. Belashkov on 2007-06-30T05:54:09+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30374 — Andrey A. Belashkov — 2007-06-30T05:54:09+00:00

URL: https://externals.io/message/30374#30374

Hello!

Can you add please `CURLOPT_PRIVATE` and `CURLINFO_PRIVATE` text parameters
to curl extension for php like `CURLOPT_URL` ?

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/
  ^^ ^^

---

## #30400 — Antony Dovgal — 2007-07-02T08:06:08+00:00

URL: https://externals.io/message/30374#30400 · In reply to: #30374

> 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

---

## #30442 — Antony Dovgal — 2007-07-04T13:19:32+00:00

URL: https://externals.io/message/30374#30442

> 
> > […]
> http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
> 
> (Added in 7.10.8)

Where do you see 7.10.8 there?
I can see only "(Added in 7.10.3)".

> > […]
> --------------------------------------------------------------
>     _
>    . .      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

---

## #30443 — David Coallier — 2007-07-04T13:24:17+00:00

URL: https://externals.io/message/30374#30443 · In reply to: #30442

> 
> > […]
>
> Where do you see 7.10.8 there?
> I can see only "(Added in 7.10.3)".
>
> > […]
>
>
> --
> Wbr,
> Antony Dovgal
>
> --
> 
> 
>
>

It is in fact in 7.10.3:

http://curl.haxx.se/mail/archive-2003-01/0054.html see
 o Added `CURLOPT_PRIVATE` and `CURLINFO_PRIVATE` 



-- 
David Coallier,
Founder & Software Architect,
Agora Production (http://agoraproduction.com)
51.42.06.70.18

---

## #30444 — Antony Dovgal — 2007-07-04T13:35:55+00:00

URL: https://externals.io/message/30374#30444 · In reply to: #30443

> 
> > […]
> 
> It is in fact in 7.10.3:
> 
> http://curl.haxx.se/mail/archive-2003-01/0054.html see
>  o Added `CURLOPT_PRIVATE` and `CURLINFO_PRIVATE` 

Ahha, so I'm not completely mad yet..
Ok, if it's 7.10.3, then we don't need any ifdefs indeed since we required cURL >= 7.10.5.
Patch committed.

-- 
Wbr, 
Antony Dovgal
