原后台余额查询提醒
This commit is contained in:
@@ -80,4 +80,31 @@ class Sms
|
||||
return ['code' => 1];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $args
|
||||
* @return void
|
||||
*/
|
||||
public static function sendToBalance($phone,$data){
|
||||
$client = self::createClient("LTAI4FmSkDSwFuXeLxsDB3jB", "r8FfRmoeWcCJyZSqqkQP2G3dKPPl2N");
|
||||
$sendSmsRequest = new SendSmsRequest([
|
||||
"phoneNumbers" => $phone,
|
||||
"signName" => "聚IP商城",
|
||||
"templateCode" => "SMS_463687988",
|
||||
"templateParam" => json_encode($data)
|
||||
]);
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
$sendResp = $client->sendSms($sendSmsRequest);
|
||||
$code = $sendResp->body->code;
|
||||
if (!Utils::equalString($code, "OK")) {
|
||||
$return_info = [
|
||||
'code' => 0,
|
||||
'msg' => $sendResp->body->message
|
||||
];
|
||||
return $return_info;
|
||||
}
|
||||
|
||||
return ['code' => 1];
|
||||
|
||||
}
|
||||
}
|
||||
43
script/product/balance.php
Normal file
43
script/product/balance.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
//查看各个后台的余额
|
||||
$is_script = 1;
|
||||
include_once __DIR__ . '/../../index.php';
|
||||
use extend\alisms\Sms;
|
||||
|
||||
//强子余额
|
||||
$time = time();
|
||||
$noce = md5(time());
|
||||
$apikey = 'a478ad5aa3079bbbef3cd45e2d55d61e';
|
||||
$sign = md5($time.$noce.$apikey);
|
||||
$url = "http://47.92.116.14:2222/api/getMoney?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
$qiangzi = json_decode(file_get_contents($url), true)['data']['money'];
|
||||
|
||||
//迅联余额
|
||||
$time = time();
|
||||
$noce = md5(time());
|
||||
$apikey = 'osoa917321hdjw';
|
||||
$sign = md5($time.$noce.$apikey);
|
||||
$url = "http://47.92.65.184:2223/api/getMoney?agentid=admin2&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
$xunlian = json_decode(file_get_contents($url), true)['data']['money'];
|
||||
|
||||
//天天余额
|
||||
$tiantian = json_decode(file_get_contents("https://yoyoapi.yoyoip.com/v1/userinfo?apiid=89&sendtime=" . time() . "&sign=" . md5('apiid=89&sendtime=' . time() . 'NFeK72yYXmPiGR86YeMCBRTWDxXkrQsd')), true)['data']['money'];
|
||||
|
||||
//云牛余额
|
||||
$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/userapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf&type=checkmoney';
|
||||
$yunniu = json_decode(file_get_contents($url), true)['balance'];
|
||||
|
||||
//火狐余额
|
||||
$url = 'http://int.linghangadmin.com:8000/sysadmin/useradmin/userapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf&type=checkmoney';
|
||||
$huohu = json_decode(file_get_contents($url), true)['balance'];
|
||||
|
||||
$info = [
|
||||
'money1'=>$qiangzi,
|
||||
'money2'=>$xunlian,
|
||||
'money3'=>$tiantian,
|
||||
'money4'=>$yunniu,
|
||||
'money5'=>$huohu,
|
||||
];
|
||||
$alisms = new Sms;
|
||||
$alisms::sendToBalance('17796668888', $info);
|
||||
|
||||
Reference in New Issue
Block a user