Skip to content

Commit 4e85635

Browse files
committed
[更新]修改httpGet方法
1 parent 390beea commit 4e85635

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Wechat/Lib/Tools.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ static public function json_encode($array)
147147
static public function httpGet($url)
148148
{
149149
$curl = curl_init();
150-
if (stripos($url, "https") === 0) {
151-
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
152-
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
153-
curl_setopt($curl, CURLOPT_SSLVERSION, 1);
154-
}
150+
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
151+
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
152+
curl_setopt($curl, CURLOPT_SSLVERSION, 1);
155153
curl_setopt($curl, CURLOPT_URL, $url);
156154
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
157155
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

0 commit comments

Comments
 (0)