PHPackages                             huangyongda/baidupush - 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. huangyongda/baidupush

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

huangyongda/baidupush
=====================

baidu Push 百度推送

v1.0.3(7y ago)026PHPPHP &gt;=5.3.0

Since Sep 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/huangyongda/baidupush)[ Packagist](https://packagist.org/packages/huangyongda/baidupush)[ RSS](/packages/huangyongda-baidupush/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

huaweipush
==========

[](#huaweipush)

php服务端 百度推送 百度 push

```

use huangyongda\baiduPush\PushService;

$config     = [
    'key'       => 'GoVFRNwsLhFUr51DQooXXXXXXX',
    'secret'    => '8VHBcGS8GyLYiuDbrG6kAsZXXXXXXXX',
    'options'   => ''
];

// 创建SDK对象.
$sdk = new PushService($config['key'],$config['secret'],$config['options']);

$channelId = ['3777664874092146200'];

// message content.
$message = array (
    // 消息的标题.
    'title' => 'Hi!',
    // 消息内容
    'description' => "hello, this message from baidu push service."
);

// 设置消息类型为 通知类型.
$opts = array (
    'msg_type' => 1
);

// 向目标设备发送一条消息
$rs = $sdk -> pushBatchUniMsg($channelId, $message, $opts);

// 判断返回值,当发送失败时, $rs的结果为false, 可以通过getError来获得错误信息.
if($rs === false){
   print_r($sdk->getLastErrorCode());
   print_r($sdk->getLastErrorMsg());
}else{
    // 将打印出消息的id,发送时间等相关信息.
    print_r($rs);
}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~29 days

Total

4

Last Release

2720d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c68754000d2ecc2fa93c1785d02ebe47cf82a4b9ae85cd75330a70f9fef205e?d=identicon)[huangyongda](/maintainers/huangyongda)

---

Top Contributors

[![huangyongda](https://avatars.githubusercontent.com/u/2100606?v=4)](https://github.com/huangyongda "huangyongda (3 commits)")

### Embed Badge

![Health badge](/badges/huangyongda-baidupush/health.svg)

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

###  Alternatives

[snapshotpl/zf-snap-geoip

MaxMind GeoIP Module for Zend Framework 2

1512.9k](/packages/snapshotpl-zf-snap-geoip)

PHPackages © 2026

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