首页 >后端开发 >php教程 >怎么捕获passbook 注册pass时候的 push token

怎么捕获passbook 注册pass时候的 push token

WBOY
WBOY原创
2016-06-06 20:44:551378浏览

服务器环境 nginx php mysql
iphone 7.0 /8.1
push token

<code>  if($_SERVER['REQUEST_METHOD']=="POST"){

//            判断是否注册
//            MailModel::getFirst()
            $payload = json_decode($_POST);

//            $payload->pushToken;

            $data['pushtoken']="";
            $data['Devicelibraryidentifier']= $urlsegment[5];
            $data['Authenticationtoken']=$_SERVER['HTTP_AUTHORIZATION'];
            $data['serialnumber']=$urlsegment[8];
            $data['typeId']=$urlsegment[7];
            $data['Update_tag']="";
            $result=DevicesModel::create($data);
            if($result){
                header("HTTP/1.0 201");
            }
            MailModel::send('945627077@qq.com', 'passupdate', '注册pass'. json_decode($data));

            DevicesModel::create($data);
            return;
        }


</code>

回复内容:

服务器环境 nginx php mysql
iphone 7.0 /8.1
push token

<code>  if($_SERVER['REQUEST_METHOD']=="POST"){

//            判断是否注册
//            MailModel::getFirst()
            $payload = json_decode($_POST);

//            $payload->pushToken;

            $data['pushtoken']="";
            $data['Devicelibraryidentifier']= $urlsegment[5];
            $data['Authenticationtoken']=$_SERVER['HTTP_AUTHORIZATION'];
            $data['serialnumber']=$urlsegment[8];
            $data['typeId']=$urlsegment[7];
            $data['Update_tag']="";
            $result=DevicesModel::create($data);
            if($result){
                header("HTTP/1.0 201");
            }
            MailModel::send('945627077@qq.com', 'passupdate', '注册pass'. json_decode($data));

            DevicesModel::create($data);
            return;
        }


</code>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn