PHP code example of zhangdi / baidu-push-sdk

1. Go to this page and download the library: Download zhangdi/baidu-push-sdk 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/ */

    

zhangdi / baidu-push-sdk example snippets




use ZhangDi\BaiduPush\Application;

$app = new Application([
    'baidu'=>[
        'site'=>'www.example.com',
        'token'=>'your-baidu-push-token'
    ]
]);

$app->push->push([
    'http://www.example.com',
    'http://www.example.com/page-1.html',
    'http://www.example.com/page-2.html',
]);