php 56 连接后从代理收到 HTTP 代码 403?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42572026/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
56 Received HTTP code 403 from proxy after CONNECT?
提问by Shrikant D
I am getting an "56 Received HTTP code 403 from proxy after CONNECT" Error while generating a lead to salesforce using cUrl from my web page. SSL certificate of the site is already expired.
我在使用 cUrl 从我的网页生成销售线索时收到“56 Received HTTP code 403 from proxy after CONNECT”错误。该站点的 SSL 证书已过期。
UPDATED:
更新:
my code is as follows:
我的代码如下:
curl_setopt($curl, CURLOPT_URL, $_url);
curl_setopt($curl, CURLOPT_POST, count($field));
curl_setopt($curl, CURLOPT_POSTFIELDS, $query_data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_USERAGENT, "cusom module");
回答by Mac_J
Add
添加
AllowCONNECT port[-port] [port[-port]] ...
below ProxyRequests On
in httpd_proxy.conf
of apache proxy
下面ProxyRequests On
在httpd_proxy.conf
Apache代理的
eg:
例如:
ProxyRequests On
AllowCONNECT 443 563 5000
5000
is port of destination address.
5000
是目的地址的端口。