Skip to content

Commit

Permalink
[更新]修改httpGet方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Feb 5, 2018
1 parent 390beea commit 4e85635
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Wechat/Lib/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,9 @@ static public function json_encode($array)
static public function httpGet($url)
{
$curl = curl_init();
if (stripos($url, "https") === 0) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSLVERSION, 1);
}
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSLVERSION, 1);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
Expand Down

0 comments on commit 4e85635

Please sign in to comment.