You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
namespace LaneWeChat\Core ;
/**
* 这一行声明了类的文档注释,提供了类的基本信息。
* 创建者: lixuan-it@360.cn
* 用户名: lane
* 日期: 15/4/29
* 时间: 上午10:51
* 邮箱: lixuan868686@163.com
* 网站: http://www.lanecn.com
*/
class Auth {
/**
* 获取微信服务器IP列表
* 这个方法用于获取微信服务器的IP地址列表。
*/
public static function getWeChatIPList (){
// 获取ACCESS_TOKEN
$accessToken = AccessToken :: getAccessToken (); // 调用AccessToken类中的getAccessToken方法来获取微信的ACCESS_TOKEN。
// 构造请求微信服务器IP列表的URL, 并将ACCESS_TOKEN拼接在URL中。
$url = 'https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=' . $accessToken ;
// 使用Curl类中的callWebServer方法发起一个GET请求到构造好的URL, 获取微信服务器的IP列表。
return Curl :: callWebServer ( $url , '' , 'GET' );
}
}