PHPackages                             evenzhou/mzpushsdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. evenzhou/mzpushsdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

evenzhou/mzpushsdk
==================

meizu push

51891PHP

Since Sep 21Pushed 7y ago3 watchersCompare

[ Source](https://github.com/MEIZUPUSH/phpsdk)[ Packagist](https://packagist.org/packages/evenzhou/mzpushsdk)[ RSS](/packages/evenzhou-mzpushsdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

魅族开放平台PUSH系统PHP版本SDK
====================

[](#魅族开放平台push系统php版本sdk)

**文档变更记录**

日期作者版本变更描述2016-08-26EvenZhou1.0撰写文档**安装说明**
========

[](#安装说明)

- **composer方式安装**

```
  "require": {
    "evenzhou/mzpushsdk":"1.0.x-dev"
  }
```

- **不支持composer情况下**

    手动include mzPushSDK目录下autoload.php

**类型定义**
========

[](#类型定义)

**返回格式**
--------

[](#返回格式)

```
{
	"code":"", //必选,返回码
	"message":"", //可选，返回消息，网页端接口出现错误时使用此消息展示给用户，手机端可忽略此消息，甚至服务端不传输此消息
	"value":"",// 必选，返回结果
	"redirect":"" //可选, returnCode=300 重定向时，使用此 URL 重新请求
}

```

**返回码**
-------

[](#返回码)

**Code****Value**200正常500其他异常1001系统错误1003服务器忙1005参数错误，请参考 API 文档1006签名认证失败110000appId 不合法110001appKey 不合法110002pushId 未注册110003pushId 非法110004参数不能为空110009应用被加入黑名单**嵌套返回码**
---------

[](#嵌套返回码)

**Code****Value**201没有权限，服务器主动拒绝501推送消息失败（ db\_error）513推送消息失败518推送超过配置的速率519推送消息失败服务过载520消息折叠（短时间内同一设备同一消息收到多次）110002pushId 未订阅110003pushId 非法**推送服务接口MzPush**
----------------

[](#推送服务接口mzpush)

实例参数：

参数名称类型必填默认值描述appIdLong是null应用appIdappSecretString是nullapp\_secretuseSSLboolen否falsehttps 或者http传输协议**通知消息**
--------

[](#通知消息)

UnvarnishedMessage

VarnishedMessage

### **透传消息UnvarnishedMessage：**

[](#透传消息unvarnishedmessage)

参数名称类型必填默认值描述titleString是null推送标题,任务推送建议填写，方便数据查询,【字数限制 1~100】contentString是null推送内容,【必填，字数限制 2000 以内】offLineint否1是否进离线消息,【非必填，默认为 1】validTimeint否24有效时长 (1 72 小时内的正整数), 【offLine值为 1 时，必填，值的范围 1--72】pushTimeTypeint否0int 定时推送 (0, "即时"),(1, "定时"), 【只对全部用户推送生效】startTimedate否null任务定时开始时间, 【pushTimeType 为 1必填】只对全部用户推送生效，如：2016-08-21fixSpeedint否0是否定速推送, 0 或 1【非必填，默认值为 0】fixSpeedRateint否0定速速率 【fixSpeed 为 1 时，必填】### **通知栏消息VarnishedMessage**

[](#通知栏消息varnishedmessage)

参数名称类型必填默认值描述titleString是null推送标题,任务推送建议填写，方便数据查询,【字数限制 1~100】contentString是null推送内容,【必填，字数限制 2000 以内】noticeBarTypeint否0通知栏样式(0, '标准')【非必填，默认值为 0】noticeExpandTypeint否0展开方式 (0, '标准'),(1, '文本')【非必填，默认值为 0】noticeExpandContentString否null展开内容, 【noticeExpandType 为文本时，必填】clickTypeint否0点击动作 (0,'打开应用'),(1,'打开应用页面'),(2,'打开 URI 页面'),【非必填，默认值为0】urlString否nullURI 页面地址, 【clickType 为打开 URI 页面时，必填, 长度限制 1000】parametersarray否null透传参数 【array格式，非必填】activityString否null应用页面地址, 【clickType 为打开应用页面时，必填, 长度限制 1000】offLineint否1是否进离线消息, (0 否 1 是\[validTime\])【非必填，默认值为 1】validTimeint否24有效时长 (172 小时内的正整数), 【offLine值为 1 时，必填，值的范围 172】pushTimeTypeint否0定时推送 (0, '即时'),(1, '定时'), 【只对全部用户推送生效】startTimedate否null任务定时开始时间【非必填 , ，pushTimeType为 True 必填】只对全部用户推送生效, 如：2016-08-20fixSpeedint否0是否定速推送, 【非必填，默认值为 0】fixSpeedRateint否0定速速率,【FixSpeed 为 1 时，必填】suspendint否1是否通知栏悬浮窗显示 (1显示，0 不显示)【非必填，默认 1】clearNoticeBarint否1是否可清除通知栏 (1 可以 0 不可以)vibrateint否1震动 (0关闭 1 开启)lightsint否1闪光 (0关闭 1 开启)soundint否1声音 (0关闭 1 开启)**接口说明**
========

[](#接口说明)

**非任务推送**
---------

[](#非任务推送)

### **通知栏消息推送（varnishedPush方法）**

[](#通知栏消息推送varnishedpush方法)

参数名称类型必填默认值描述pushIdsArray是null需要推送的pushId集合varnishedMessageVarnishedMessage是nullVarnishedMessage对象实例### **透传消息推送 UnvarnishedPush方法**

[](#透传消息推送-unvarnishedpush方法)

参数名称类型必填默认值描述pushIdsArray是null需要推送的pushId集合unvarnishedMessageUnvarnishedMessage是nullunvarnishedMessage对象实例**任务类推送**
---------

[](#任务类推送)

### **获取推送 taskId（getTaskId）**

[](#获取推送-taskidgettaskid)

参数名称类型必填默认值描述pushTypeInt是null取值为0或者1。1为透传消息，0为通知栏消息messageVarnishedMessage或者UnVarnishedMessage是null通知消息类型实例，应该与对应的pushType相对应### **推送给所有APP用户（pushToApp方法）**

[](#推送给所有app用户pushtoapp方法)

参数名称类型必填默认值描述pushTypeInt是null取值为0或者1。1为透传消息，0为通知栏消息messageVarnishedMessage或者UnVarnishedMessage是null通知消息类型实例，应该与对应的pushType相对应此接口调用之后，系统会自动推送给所有APP用户，不需要另外处理

### **任务透传消息推送（taskUnvarnished）**

[](#任务透传消息推送taskunvarnished)

参数名称类型必填默认值描述taskIdInt是nulltaskIdpushIdsArray是null需要推送的pushId集合### **任务通知栏消息推送（taskVarnished）**

[](#任务通知栏消息推送taskvarnished)

参数名称类型必填默认值描述taskIdInt是nulltaskIdpushIdsArray是null需要推送的pushId集合### **取消推送任务（cancelTask）**

[](#取消推送任务canceltask)

参数名称类型必填默认值描述pushTypeInt是null取值为0或者1。1为透传消息，0为通知栏消息taskIdInt是null消息类型对应的taskId> 取消推送只能取消pushToApp接口返回的taskId

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c490ffe19d98f9ed4ec41b56043caa0a8393f05d47d788a1af42353b4b75bd8?d=identicon)[evenzhou](/maintainers/evenzhou)

---

Top Contributors

[![evenzhou](https://avatars.githubusercontent.com/u/16346914?v=4)](https://github.com/evenzhou "evenzhou (7 commits)")[![huaguzi](https://avatars.githubusercontent.com/u/5173833?v=4)](https://github.com/huaguzi "huaguzi (2 commits)")[![comsince](https://avatars.githubusercontent.com/u/4187013?v=4)](https://github.com/comsince "comsince (1 commits)")

### Embed Badge

![Health badge](/badges/evenzhou-mzpushsdk/health.svg)

```
[![Health](https://phpackages.com/badges/evenzhou-mzpushsdk/health.svg)](https://phpackages.com/packages/evenzhou-mzpushsdk)
```

###  Alternatives

[cjmellor/level-up

This package allows users to gain experience points (XP) and progress through levels by performing actions on your site. It can provide a simple way to track user progress and implement gamification elements into your application

66188.9k](/packages/cjmellor-level-up)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[trafficcophp/bytebuffer

Node.js inspired byte stream buffer for PHP.

33437.2k17](/packages/trafficcophp-bytebuffer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
