PHP code example of wstools / push-notice

1. Go to this page and download the library: Download wstools/push-notice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wstools / push-notice example snippets


use wenshi\push\notice;

PushNotice::setSign('您的项目唯一码');

use wenshi\push\notice;

/**
*@param uid   必填   用户id
*@param cid   必填   手机序列号
*/
PushNotice::regCid('5','2925b1bcf4eb21feffda6d14e1bfecb6');

use wenshi\push\notice;

/**
*用户手机号
*用户填写的验证码
*/
/**
*@param uid   必填   用户id
*@param cid   必填   手机序列号
*/
PushNotice::closeCid('5','2925b1bcf4eb21feffda6d14e1bfecb6');

use wenshi\push\notice;

*/
/**
*@param uid       必填     用户id,多个已逗号隔开
*@param title     必填     推送的标题
*@param content   必填     推送的内容
@param data       非必填   个人需要传递推送的数据 []
*/
PushNotice::Push('5,6,11','这个推送标题','推送的内容',['info'=>'你好','type'=>1]);

use wenshi\push\notice;

*/
*@param title     必填     推送的标题
*@param content   必填     推送的内容
@param data       非必填   个人需要传递推送的数据 []
*/
PushNotice::pushToApp('这个推送标题','推送的内容',['info'=>'你好','status'=>1]);