limingxinleo/baidu-tieba-sign-library

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

baidu tieba sign library

0.1.2 2017-10-14 04:31 UTC

This package is auto-updated.

Last update: 2021-09-17 12:54:09 UTC


README

百度贴吧 签到扩展包

安装

composer require limingxinleo/baidu-tieba-sign-library

使用

<?php 
use Yi\Baidu\Application;

$client = new Application([
    'bduss' => $bduss,
    'nickname' => 'Your Nick Name'
]);

$result = $client->user->flushTiebas();
$this->assertTrue(count($result) > 0);

/** @var \Yi\Baidu\User\Tieba $item */
foreach ($result as $item) {
    $res = $item->sign();
    $this->assertTrue($res['no'] === 0 || $res['no'] === 1101);
}

配置

bduss: 登录百度贴吧网页,打开F12,从cookies中找到BDUSS
nickname:就是你的昵称