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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 02:38:30  来源:igfitidea点击:

56 Received HTTP code 403 from proxy after CONNECT?

phpcurlsalesforcessl-certificatephp-openssl

提问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 Onin httpd_proxy.confof apache proxy

下面ProxyRequests Onhttpd_proxy.confApache代理的

eg:

例如:

ProxyRequests On
AllowCONNECT 443 563 5000

5000is port of destination address.

5000是目的地址的端口。