XML_RPC2 Client无法使用代理解决

栏目:Linux 作者:小天 点击: 4,539 次

修改位置一:
/lib/php/XML/RPC2/Util/HTTPRequest.php 文件中
找到public function sendRequest()函数的第一行加入以下代码:
$params['proxy'] = $this->_proxy; //自定义代码
修改位置二:
/lib/php/HTTP/Request2/SocketWrapper.php 文件中
中的public function __construct($address, $timeout, array $contextOptions = array())函数中找到以下代码:
set_error_handler(array($this, 'connectionWarningsHandler'))
在代码上面加入以下代码:

//自定义代码
if(!$contextOptions['ssl']['verify_peer']){
stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
}
//自定义代码



声明: 本文由( 小天 )原创编译,转载请保留链接: XML_RPC2 Client无法使用代理解决

------====== 本站公告 ======------
欢迎使用趣域网域名百科,我们将长期提供域名使用相关知识和投资域名的方法和技巧;并提供主机、服务器的解决问题和网站运营方法。