$obj = new \wechat\Wechat();
// 获取微信服务器IP
$obj->official()->base()->get_domain_ip();
成功输出:
array(19) {
[0] => string(12) "101.89.47.18"
[1] => string(13) "101.91.34.103"
......
}
$obj = new \wechat\Wechat();
$obj->official()->base()->ping([
"action" => "all",
"check_operator" => "DEFAULT"
];
成功输出:
{
["dns"] => array(1) {
[0] => array(2) {
["ip"] => string(14) "120.78.142.146"
["real_operator"] => string(6) "UNICOM"
}
}
["ping"] => array(1) {
[0] => array(4) {
["ip"] => string(14) "120.78.142.146"
["from_operator"] => string(6) "UNICOM"
["package_loss"] => string(2) "0%"
["time"] => string(8) "32.897ms"
}
}
}
$obj = new \wechat\Wechat();
// 清空api的调用quota false.失败 true.成功
$obj->official()->base()->clear_quota();
$obj = new \wechat\Wechat();
$obj->official()->base()->get_quota([
"cgi_path" => "/cgi-bin/message/custom/send"
]);
成功输出:
array(3) {
["daily_limit"] => int(50000)
["used"] => int(0)
["remain"] => int(50000)
}
$obj = new \wechat\Wechat();
$obj->official()->base()->get_rid([
"rid" => "61a5843e-5abc8662-572f486b"
]);
成功输出:
array(5) {
["invoke_time"] => int(1638237246)
["cost_in_ms"] => int(232)
["request_url"] => string(170) "access_token=51_e3WXv6OpW4CbN0RShVKbZI2Rlj-oruED5QPMUlrA-emhZC1-3RTx64wNMID-NuH8lzuF16smduOunTuIsJ90dhwDOeYb3y4rUwiGFMKhXBZk1v2ro3CTKK3qj3H50JSkQsdYHilBni9QJktYMEPeAEAXPA"
["request_body"] => string(42) "{"cgi_path":"\/wxa\/gettemplatedraftlist"}"
["response_body"] => string(103) "{"errcode":76022,"errmsg":"could not use this cgi_path, no permission rid: 61a5843e-5abc8662-572f486b"}"
}