Skip to content

Commit

Permalink
ignore https
Browse files Browse the repository at this point in the history
  • Loading branch information
lyhiving committed Nov 6, 2021
1 parent f823e99 commit 46b343e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/guanyierp.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ public function url($method, $url, $data = [], $extopt = [], $timeout = null)

curl_setopt($ch, CURLOPT_HTTPHEADER, $extopt['header']);
}
if ($scheme == 'https') { //忽略证书部分
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
$content = curl_exec($ch);
curl_close($ch);
return $content;
Expand Down
4 changes: 4 additions & 0 deletions src/guanyiweb.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ public function url($method, $url, $data = [], $extopt = [], $timeout = null)

curl_setopt($ch, CURLOPT_HTTPHEADER, $extopt['header']);
}
if ($scheme == 'https') { //忽略证书部分
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
$content = curl_exec($ch);
curl_close($ch);
return $content;
Expand Down

0 comments on commit 46b343e

Please sign in to comment.