PHP code example of limingxinleo / baidu-tieba-sign-library
1. Go to this page and download the library: Download limingxinleo/baidu-tieba-sign-library 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/ */
limingxinleo / baidu-tieba-sign-library example snippets
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);