123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use Redis;
- use think\Db;
- use app\common\library\Easemob as Easemoblib;
- /**
- * 环信接口
- */
- class Easemob extends Api
- {
- protected $noNeedLogin = ["callback"];
- protected $noNeedRight = ['*'];
- protected $appKey;
- protected $redis;
- public function __construct() {
- //初始化配置
- $easemob_config = config('easemob');
- $this->appKey = $easemob_config['appkey'];
- //redis
- $redis = new Redis();
- $redisconfig = config("redis");
- $redis->connect($redisconfig["host"], $redisconfig["port"]);
- if ($redisconfig['redis_pwd']) {
- $redis->auth($redisconfig['redis_pwd']);
- }
- if($redisconfig['redis_selectdb'] > 0){
- $redis->select($redisconfig['redis_selectdb']);
- }
- $this->redis = $redis;
- }
- /**
- * 回调
- * https://docs-im-beta.easemob.com/document/server-side/callback_configurations.html
- *
- * 群组和聊天室操作:
- *
- * muc:presence 有新成员加入了聊天室
- *{"callId":"1101231101159883#demo_1215090885268604500","channel_channel":"1101231101159883#demo_230909515202562@admin.conference.easemob.com","eventType":"chat","channel_user":"1101231101159883#demo_9@easemob.com","chat_type":"muc","security":"845b22a4edcb4fde2185ff7f0374f051","is_downgrade":false,"content_type":"muc:presence","payload":{"muc_id":"1101231101159883#demo_230909515202562@conference.easemob.com","is_chatroom":true,"operation":"presence"},"group_id":"230909515202562","writed_channel":false,"host":"msync@ebs-ali-beijing-msync105","appkey":"1101231101159883#demo","from":"1101231101159883#demo_9@easemob.com","to":"230909515202562","msg_id":"1215090885268604500","timestamp":1700475192937}
- *
- * muc:kick 踢出聊天室
- * {"callId":"1101231101159883#demo_1215088856588617164","channel_channel":"1101231101159883#demo_9@easemob.com","eventType":"chat","channel_user":"1101231101159883#demo_231181574537218@admin.conference.easemob.com","chat_type":"muc","security":"83f9462c7769df1c979fd9dea88e7400","is_downgrade":false,"content_type":"muc:kick","payload":{"muc_id":"1101231101159883#demo_231181574537218@conference.easemob.com","reason":"chatroom kick offline user","is_chatroom":true,"operation":"kick","status":{"description":"","error_code":"ok"}},"group_id":"231181574537218","writed_channel":false,"host":"msync@ebs-ali-beijing-msync71","appkey":"1101231101159883#demo","from":"1101231101159883#demo_9@easemob.com","to":"9","msg_id":"1215088856588617164","timestamp":1700474720591}
- *
- * muc:absence 有成员离开了聊天室
- * {"callId":"1101231101159883#demo_1215088856710252128","channel_channel":"1101231101159883#demo_231181574537218@admin.conference.easemob.com","eventType":"chat","channel_user":"admin@easemob.com","chat_type":"muc","security":"ec7d29ea415ea5930c2236089dff3bc2","is_downgrade":false,"content_type":"muc:absence","payload":{"muc_id":"1101231101159883#demo_231181574537218@conference.easemob.com","is_chatroom":true,"operation":"absence"},"group_id":"231181574537218","writed_channel":false,"host":"msync@ebs-ali-beijing-msync108","appkey":"1101231101159883#demo","from":"1101231101159883#demo_9@easemob.com","to":"231181574537218","msg_id":"1215088856710252128","timestamp":1700474720619}
- *
- * muc:leave 成员主动退出聊天室
- *
- *
- * 用户登入
- * {"callId":"1101231101159883#demo_927e28f2-0e88-4a58-855b-c8d26949ea4f","reason":"login","security":"6b793f812b5ed74f62d3a95d9ea48c8f","os":"android","ip":"182.37.138.94:39768","host":"msync@ebs-ali-beijing-msync60","session_id":"1215076057950983584","appkey":"1101231101159883#demo","user":"1101231101159883#demo_2@easemob.com/android_f9f51032-3369-4f02-95bb-0cbf41b26837","version":"4.1.2","timestamp":1700471740680,"status":"online"}
- *
- * 用户登出
- * {"callId":"1101231101159883#demo_ee82832b-3455-472d-9024-3706b1e519a7","reason":"logout","security":"6266f2a31bc3b603d8458f3d39a49d47","os":"android","ip":"182.37.138.94:39768","host":"msync@ebs-ali-beijing-msync60","session_id":"1215076057950983584","appkey":"1101231101159883#demo","user":"1101231101159883#demo_2@easemob.com/android_f9f51032-3369-4f02-95bb-0cbf41b26837","version":"4.1.2","timestamp":1700472505682,"status":"offline"}
- *
- * 用户登出(被其他设备踢掉)
- * {"callId":"1101231101159883#demo_b2cdc4d9-a499-4e46-8aff-4503fb83a5c5","reason":"replaced","security":"1f4bb2ebb99c2f5da20048c7ca87f352","os":"android","ip":"182.37.138.94:41044","host":"msync@ebs-ali-beijing-msync62","appkey":"1101231101159883#demo","user":"1101231101159883#demo_9@easemob.com/android_fb260fdf-3935-4499-a09d-b270fdd88a0e","version":"4.1.2","timestamp":1700473675582,"status":"offline"}
- */
- public function callback() {
- $this->notify_log_start();
- $input = file_get_contents("php://input"); // 主题信息
- $input = json_decode($input,true);
- //验证加密
- //解析数据格式
- //用户登入
- if(isset($input['reason']) && $input['reason'] == 'login' && isset($input['status']) && $input['status'] == 'online'){
- $user = $input['user'];
- $uid = $this->get_easemob_uid($user);//用户主键id
- //开始处理
- $loginToday = Db::name('user')->where('id',$uid)->whereTime('onlinetime', 'today')->find();
- if ($loginToday){
- \app\common\model\User::update(["is_online"=>1,"onlinetime"=>time()],["id"=>$uid]);
- }else{
- \app\common\model\User::update(["is_online"=>1,"onlinetime"=>time()],["id"=>$uid]);
- }
- exit;
- }
- //用户登出
- //用户登出(被其他设备踢掉)
- if(isset($input['reason']) && ( $input['reason'] == 'logout' || $input['status'] == 'replaced') && isset($input['status']) && $input['status'] == 'offline'){
- $user = $input['user'];
- $uid = $this->get_easemob_uid($user);//用户主键id
- //开始处理
- // 更新用户在线状态为离线
- \app\common\model\User::update(["is_online"=>0],["id"=>$uid]);
- \app\common\model\User::update(["is_live"=>0],["id"=>$uid]);
- $livingUserPartyId = $this->redis->hGet("livingUser", $uid);
- if ($livingUserPartyId) {
- // 扣除在线用户在房间情况
- $this->redis->hDel("livingUser", $uid);
- $this->redis->HDel("online_" . $livingUserPartyId, $uid);
- $this->redis->zRem("party_user_".$livingUserPartyId,$uid); //新加的
- }
- // 获取用户所在群信息
- $groupids = $this->getJoindGroupList($uid);
- // \app\common\model\Test::update(["content"=>json_encode($groupids)],["id"=>1]);
- if($groupids["ErrorCode"] == 0) {
- $grouplist = $groupids["GroupIdList"];
- $groupsites = [];
- if($grouplist) foreach($grouplist as $k => $v) {
- // 获取群组消息
- $groupInfo = $this->getGroupInfo($v["GroupId"]);
- if($groupInfo["ErrorCode"] == 0) $groupsites[] = $groupInfo["GroupInfo"][0];
- // 踢出用户在线组
- $this->redis->HDel("online_".$v["GroupId"],$uid);
- $this->redis->zRem("party_user_".$v["GroupId"],$uid); //新加的
- // 更新麦位前四
- $this->updatePosition($uid,$v["GroupId"]);
- // 取消排麦
- $this->cancelLineup($uid,$v["GroupId"]);
- // 房间状态变更
- $partyInfo = $this->redis->get("party_".$v["GroupId"]);
- if($partyInfo) {
- $partyInfo = json_decode($partyInfo,true);
- $memCount = count($this->redis->hGetAll("online_".$v["GroupId"]));
- if($memCount <= 0) {
- $partyInfo["is_online"] = 0;
- $this->redis->set("party_".$v["GroupId"],json_encode($partyInfo));
- \app\common\model\Party::update(["is_online"=>0],["id"=>$v["GroupId"]]);
- }
- }
- $liveInfo = $this->redis->get("live_".$v["GroupId"]);
- if($liveInfo) {
- $liveInfo = json_decode($liveInfo,true);
- $memCount = count($this->redis->hGetAll("online_".$v["GroupId"]));
- if($memCount <= 0) {
- $liveInfo["is_online"] = 0;
- $this->redis->set("live_".$v["GroupId"],json_encode($liveInfo));
- \app\common\model\Party::update(["is_online"=>0],["id"=>$v["GroupId"]]);
- }
- }
- }
- // 强制下麦
- print_r($this->downSite($uid,$groupsites));
- }
- exit;
- }
- //群组和聊天室操作:
- //muc:presence 有新成员加入了聊天室
- //muc:kick 踢出聊天室
- //muc:absence 有成员离开了聊天室
- //muc:leave 成员主动退出聊天室
- if(isset($input['chat_type']) && $input['chat_type'] == 'muc' && isset($input['eventType']) && $input['eventType'] == 'chat'){
- $room_id = '';
- $is_chatroom = false;
- $operation = false;
- $error_code = false;
- if(isset($input['payload'])){
- $payload = $input['payload'];
- if(isset($payload['muc_id'])){
- $room_id = $this->get_easemob_uid($payload['muc_id']);
- }
- if(isset($payload['is_chatroom']) && $payload['is_chatroom'] == true){
- $is_chatroom = true;
- }
- if(isset($payload['operation']) && in_array($payload['operation'],['kick','absence','leave']) ){
- $operation = 'out';
- }
- if(isset($payload['operation']) && $payload['operation'] = 'presence' ){
- $operation = 'in';
- }
- if(isset($payload['status']['error_code']) && $payload['status']['error_code'] == 'ok'){
- $error_code = true;
- }
- }
- //用户
- $uid = 0;
- if(isset($input['from'])){
- $uid = $this->get_easemob_uid($input['from']);
- }
- //开始处理
- //进入房间
- if($uid && $room_id && $is_chatroom && $operation == 'in' && $error_code){
- $roomId = $room_id;
- $userId = $uid;
- $this->redis->hSet("online_" . $roomId, $userId, $userId);
- $this->redis->zAdd("party_user_".$roomId,$userId,0); //新加的
- // 记录在线用户在房间情况
- $this->redis->hSet("livingUser",$userId,$roomId);
- // 更新房间在线状态
- $partyInfo = $this->redis->get("party_" . $roomId);
- if ($partyInfo) {
- $partyInfo = json_decode($partyInfo, true);
- if ($partyInfo["is_online"] != 1) {
- $partyInfo["is_online"] = 1;
- $this->redis->set("party_" . $roomId, json_encode($partyInfo));
- \app\common\model\Party::update(["is_online" => 1], ["id" => $roomId]);
- }
- }
- // 更新房间在线状态
- $liveInfo = $this->redis->get("live_" . $roomId);
- if ($liveInfo) {
- $liveInfo = json_decode($liveInfo, true);
- if ($liveInfo["is_online"] != 1) {
- $liveInfo["is_online"] = 1;
- $this->redis->set("live_" . $roomId, json_encode($liveInfo));
- \app\common\model\Party::update(["is_online" => 1], ["id" => $roomId]);
- $rs_user = Db::name('user')->where('id',$userId)->update(['is_live'=>1]);
- }
- }
- }
- //出去房间
- if($uid && $room_id && $is_chatroom && $operation == 'out' && $error_code){
- $roomId = $room_id;
- $userId = $uid;
- $this->redis->HDel("online_" . $roomId, $userId);
- $this->redis->zRem("party_user_".$roomId,$userId); //新加的
- // 扣除在线用户在房间情况
- $this->redis->hDel("livingUser",$userId);
- // 更新房间在线状态
- $partyInfo = $this->redis->get("party_" . $roomId);
- if ($partyInfo) {
- $partyInfo = json_decode($partyInfo, true);
- $memCount = count($this->redis->hGetAll("online_" . $roomId));
- if ($memCount <= 0) {
- $partyInfo["is_online"] = 0;
- $this->redis->set("party_" . $roomId, json_encode($partyInfo));
- \app\common\model\Party::update(["is_online" => 0], ["id" => $roomId]);
- }
- }
- //
- $liveInfo = $this->redis->get("live_" . $roomId);
- if ($liveInfo) {
- $liveInfo = json_decode($liveInfo, true);
- $memCount = count($this->redis->hGetAll("online_" . $roomId));
- if ($memCount <= 0) {
- $liveInfo["is_online"] = 0;
- $this->redis->set("live_" . $roomId, json_encode($liveInfo));
- \app\common\model\Party::update(["is_online" => 0], ["id" => $roomId]);
- $rs_user = Db::name('user')->where('id',$userId)->update(['is_live'=>0]);
- }
- }
- //退出房间获取房间自定义属性
- //清理这个人的麦序
- $this->clean_seat($roomId,$uid);
- }
- }
- }
- //待唱,增加
- public function clean_seat($easemob_room_id,$uid){
- $party_info = Db::name('party')->where('easemob_room_id',$easemob_room_id)->find();
- if(empty($party_info)){
- return false;
- }
- //获取所有麦位,假设8个
- $easemob = new Easemoblib();
- $seatlist = $easemob->room_getRoomCustomAttribute($easemob_room_id,['seat1','seat2','seat3','seat4','seat5','seat6','seat7','seat8']);
- if(empty($seatlist)){
- //默认为空
- return false;
- }
- $newseat = [
- 'charm' => 0, //红心,魅力值
- 'isMaster' => false, // 是否是房主
- 'headUrl' => '', // 头像
- 'userNo' => '', // 座位上用户no
- 'rtcUid' => '', // 座位上用户id,与rtc的userId一致
- 'name' => '', // 座位上用户昵称
- 'seatIndex' => 0, // 座位编号
- 'chorusSongCode' => '', // 是否合唱
- 'isAudioMuted' => 1, // 是否静音
- 'isVideoMuted' => 0, // 是否开启视频
- ];
- foreach($seatlist as $k => $seat){
- $seat = json_decode($seat,true);
- if(isset($seat['rtcUid']) && !empty($seat['rtcUid']) && $seat['rtcUid'] == $uid){
- $newseat['seatIndex'] = $seat['seatIndex'];
- //重新设置
- $matedata = [
- $k => json_encode($newseat),
- ];
- $easemob->room_setRoomCustomAttributeForced($easemob_room_id,$party_info['user_id'],$matedata);
- }
- }
- return true;
- }
- /**
- * 获取用户所加入的聊天室
- */
- public function getJoindGroupList($user_id) {
- $random = rand(10000000,99999999);
- $usersig = $this->usersig("administrator");
- // 获取配置信息
- $config = config("tencent_im");
- $url = "https://console.tim.qq.com/v4/group_open_http_svc/get_joined_group_list";
- $url .= "?sdkappid=".$config["sdkappid"];
- $url .= "&identifier=administrator";
- $url .= "&usersig=".$usersig;
- $url .= "&random=".$random;
- $url .= "&contenttype=json";
- $tencentObj = new tencentim($url);
- $data = [];
- $data["Member_Account"] = $user_id;
- $data["WithHugeGroups"] = 1;
- $data["GroupType"] = 'AVChatRoom';
- $data["ResponseFilter"] = ["GroupBaseInfoFilter" => ['GroupId'] ];
- $groupInfo = $tencentObj->toSend($data);
- // \app\common\model\Test::update(["content"=>json_encode($groupInfo)],["id"=>1]);
- return $groupInfo;
- }
- /**
- * 获取群组信息
- */
- public function getGroupInfo($party_id='0') {
- $party_id = !empty($party_id) ? $party_id : $this->request->param('part_id',0);
- $random = rand(10000000,99999999);
- $usersig = $this->usersig("administrator");
- // 获取配置信息
- $config = config("tencent_im");
- $url = "https://console.tim.qq.com/v4/group_open_http_svc/get_group_info";
- $url .= "?sdkappid=".$config["sdkappid"];
- $url .= "&identifier=administrator";
- $url .= "&usersig=".$usersig;
- $url .= "&random==".$random;
- $url .= "&contenttype=json";
- $tencentObj = new tencentim($url);
- $data = [];
- $data["GroupIdList"] = [(string)$party_id];
- $data["ResponseFilter"] = [
- "GroupBaseInfoFilter" => ["GroupId","Type","Name","FaceUrl","Owner_Account","MemberNum"],
- "MemberInfoFilter" => ["Account","Role"],
- "AppDefinedDataFilter_Group" => ["roomInfo"],
- ];
- $groupInfo = $tencentObj->toSend($data);
- $this->success('获取成功',$groupInfo['GroupInfo']);
- }
- /**
- * 更新麦位前四
- */
- public function updatePosition($user_id,$party_id) {
- // 获取用户头像
- $userInfo = \app\common\model\User::field("avatar")->where(["id"=>$user_id])->find();
- $userAvatar = isset($userInfo["avatar"])?$userInfo["avatar"]:"";
- // 更新下麦时间
- $update = [];
- $update["offsite_time"] = time();
- $update["status"] = 2;
- \app\common\model\UserOnsiteTime::update($update,["user_id"=>$user_id,"status"=>1]);
- //
- $redis = new Redis();
- $redisconfig = config("redis");
- $redis->connect($redisconfig["host"], $redisconfig["port"]);
- if ($redisconfig['redis_pwd']) {
- $redis->auth($redisconfig['redis_pwd']);
- }
- if($redisconfig['redis_selectdb'] > 0){
- $redis->select($redisconfig['redis_selectdb']);
- }
- $room_type = Db::name('party')->where('id',$party_id)->value('room_type');
- $redisData = $redis->get($room_type."_".$party_id);
- if(!$redisData){
- return true;
- }
- $partyInfo = json_decode($redisData,true);
- // 遍历已有头像
- $partyuser = isset($partyInfo["party_user"])?$partyInfo["party_user"]:"";
- if(is_array($partyuser)) foreach($partyuser as $k => $v) if($v === $userAvatar) unset($partyInfo["party_user"][$k]);
- $redis->set($room_type."_".$party_id,json_encode($partyInfo));
- }
- /**
- * 取消排麦
- */
- public function cancelLineUp($user_id,$party_id) {
- if (!$party_id || !$user_id) {
- return false;
- }
- $redis = new Redis();
- $redisconfig = config("redis");
- $redis->connect($redisconfig["host"], $redisconfig["port"]);
- if ($redisconfig['redis_pwd']) {
- $redis->auth($redisconfig['redis_pwd']);
- }
- if($redisconfig['redis_selectdb'] > 0){
- $redis->select($redisconfig['redis_selectdb']);
- }
- $data=unserialize($redis->hGet("party_lineup",$party_id));
- // 更改红点排麦数量
- $num = 0;
- $send = false;
- if($data) foreach($data as $k => $v) {
- if($v["user_id"] == $user_id) {
- $send = true;
- unset($data[$k]);
- break;
- }
- }
- $redis->hSet("party_lineup",$party_id,serialize($data));
- if($send) {
- is_array($data) && $num = count($data);
- $random = rand(10000000,99999999);
- $usersig = $this->usersig("administrator");
- // 获取配置信息
- $config = config("tencent_im");
- $url = "https://console.tim.qq.com/v4/group_open_http_svc/send_group_msg";
- $url .= "?sdkappid=".$config["sdkappid"];
- $url .= "&identifier=administrator";
- $url .= "&usersig=".$usersig;
- $url .= "&random=".$random;
- $url .= "&contenttype=json";
- $tencentObj = new tencentim($url);
- $data = [];
- $data["GroupId"] = $party_id;
- $data["Random"] = rand(1000000,9999999);
- $message = [
- "message" => json_encode(["type"=>23,"content"=>$num]),
- "version" => "1.0",
- "action" => 301,
- "command" => ""
- ];
- $data["MsgBody"][] = [
- "MsgType" => "TIMCustomElem",
- "MsgContent" => [
- "Data"=> json_encode($message)
- ],
- ];
- $tencentObj->toSend($data);
- }
- }
- /**
- * 强制下线
- */
- public function downSite($user_id,$groupsites) {
- $random = rand(10000000,99999999);
- $usersig = $this->usersig("administrator");
- // 获取配置信息
- $config = config("tencent_im");
- $url = "https://console.tim.qq.com/v4/group_open_http_svc/modify_group_base_info";
- $url .= "?sdkappid=".$config["sdkappid"];
- $url .= "&identifier=administrator";
- $url .= "&usersig=".$usersig;
- $url .= "&random=".$random;
- $url .= "&contenttype=json";
- $tencentObj = new tencentim($url);
- // 先更新下麦时间
- $update = [];
- $update["offsite_time"] = time();
- $update["status"] = 2;
- \app\common\model\UserOnsiteTime::update($update,["user_id"=>$user_id,"status"=>1]);
- // 循环房间
- if($groupsites) foreach($groupsites as $k => $v) {
- // 循环座位
- $data = [];
- foreach($v["AppDefinedData"] as $m => $n) {
- // 解析字段信息
- $siteInfo = json_decode($n["Value"],true);
- if($m != 0 && isset($siteInfo["status"]) && $siteInfo["status"] == 1 && isset($siteInfo["status"]) && $siteInfo["user"] == $user_id) {
- $data["AppDefinedData"][] = [
- "Key" => $n["Key"],
- "Value" => '{"mute":false,"status":0,"user":""}',
- ];
- }
- }
- if(!empty($data)) {
- $data["GroupId"] = $v["GroupId"];
- return $tencentObj->toSend($data);
- }
- }
- }
- //输入: 1101231101159883#demo_9@easemob.com/android_f9f51032-3369-4f02-95bb-0cbf41b26837
- //输出: 9
- //输入: 1101231101159883#demo_231181574537218@admin.conference.easemob.com
- //输出: 231181574537218
- private function get_easemob_uid($user = ''){
- //去掉后半段
- $easemob = '@';
- $start = strpos($user,$easemob);
- $uid = substr($user,0,$start);
- //echo $uid;
- //echo '<br>';
- //去掉前缀
- $uid = substr($uid,strlen($this->appKey)+1);
- //echo $uid;
- return intval($uid);
- }
- //异步日志
- private function notify_log_start($paytype = 'easemob'){
- //记录支付回调数据
- ignore_user_abort(); // run script in background
- set_time_limit(30);
- // 日志文件 start
- $log_base_dir = '../paylog/'.$paytype.'/';
- if (!is_dir($log_base_dir))
- {
- mkdir($log_base_dir, 0770, true);
- @chmod($log_base_dir, 0770);
- }
- $notify_file = $log_base_dir.'notify.txt';
- if(!file_exists($notify_file)) {
- @touch($notify_file);
- @chmod($notify_file, 0770);
- }
- if(filesize($notify_file)>5242880)//大于5M自动切换
- {
- rename($notify_file, $log_base_dir.'notify_'.date('Y_m_d_H_i_s').'.txt');
- }
- if(!file_exists($notify_file)) {
- @touch($notify_file);
- @chmod($notify_file, 0770);
- }
- // 日志文件 end
- //开始写入
- $xml = file_get_contents("php://input");
- file_put_contents($notify_file, "\r\n\r\n".date('Y-m-d H:i:s')." [notify][入口接收php://input流原始数据] \n".$xml, FILE_APPEND);
- ini_set('display_errors','On');
- return $notify_file;
- }
- }
|