Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ThinkSDK/ThinkOauth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,14 @@ protected function url($api, $fix = ''){
* @return array $data 响应数据
*/
protected function http($url, $params, $method = 'GET', $header = array(), $multi = false){
$UserAgent = 'Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$opts = array(
CURLOPT_TIMEOUT => 30,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_HTTPHEADER => $header
CURLOPT_USERAGENT => $UserAgent
);

/* 根据请求类型设置特定参数 */
Expand Down Expand Up @@ -256,4 +258,4 @@ abstract protected function parseToken($result, $extend);
* 获取当前授权用户的SNS标识
*/
abstract public function openid();
}
}