mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-06 03:58:03 +08:00
[更新]增加部分接口支持
This commit is contained in:
parent
009f1eaeb7
commit
16cc729535
@ -38,5 +38,32 @@ class Limit extends BasicWeChat
|
|||||||
return $this->callPostApi($url, ['appid' => $this->config->get('appid')]);
|
return $this->callPostApi($url, ['appid' => $this->config->get('appid')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网络检测
|
||||||
|
* @param string $action 执行的检测动作
|
||||||
|
* @param string $operator 指定平台从某个运营商进行检测
|
||||||
|
* @return array
|
||||||
|
* @throws Exceptions\InvalidResponseException
|
||||||
|
* @throws Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function ping($action = 'all', $operator = 'DEFAULT')
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/callback/check?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['action' => $action, 'check_operator' => $operator]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取微信服务器IP地址
|
||||||
|
* @return array
|
||||||
|
* @throws Exceptions\InvalidResponseException
|
||||||
|
* @throws Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getCallbackIp()
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->httpGetForJson($url);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user