PHP code example of xiaodi / think-site-pusher

1. Go to this page and download the library: Download xiaodi/think-site-pusher 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/ */

    

xiaodi / think-site-pusher example snippets


use EasyPush\Facade\Pusher;

$config = ['site' => 'xxx', 'token' => 'xxx'];
Pusher::baidu($config)->urls($urls);

use EasyPush\Facade\Pusher;

$urls = [
  'https://www.xiaodim.com/index.html',
  'https://www.xiaodim.com/2019/10/25/thinkphp6-rpc-tutorial/'
]

// 推送链接
Pusher::baidu()->push($urls);

// 更新链接
Pusher::baidu()->update($urls);

// 删除链接
Pusher::baidu()->delete($urls);


$urls = [
  'https://www.xiaodim.com/index.html',
  'https://www.xiaodim.com/2019/10/25/thinkphp6-rpc-tutorial/'
]

// 推送链接
app('pusher')->baidu()->push($url);

// 更新链接
app('pusher')->baidu()->update($urls);

// 删除链接
app('pusher')->baidu()->delete($urls);