curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: PHP HTTPS Proxy

From: beshoo <beshoo_at_gmail.com>
Date: Sun, 5 Feb 2017 15:40:32 +0200

Dear Daniel
thank you for your kindly reply

regarding CURLPROXY_HTTP, there is noting in php named as "CURLPROXY_HTTPS"...
strange

now i fix the code to be as :

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
    curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
    curl_setopt($ch, CURLOPT_PROXY, $proxy_ip);
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $auth);
    $data = curl_exec($ch);
    curl_close($ch);

But as you side
    curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
has to refer to https , any idea if there is a workaround ?

On Sun, Feb 5, 2017 at 12:38 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> CURLPROXY_HTTPS

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-05