Setting Up Baidu Tieba Cloud Sign-In
This article is automatically translated by LLM, so the translation may be inaccurate or incomplete. If you find any mistake, please let me know.
You can find the original article here .
Baidu Tieba Cloud Sign-In is an open-source PHP program that can set up a system for automatic sign-in to Baidu Tieba.
Many websites found through Google searches for Tieba automatic sign-in
use this system.
So, I used GearHost free server and database to set up a private sign-in server.
Tutorial
Register a GearHost Account (Optional)
If you have another server with PHP and MySQL, you can skip this step.
Go to GearHost and register an account.
Then, in the management page, find CloudSites
and Databases
on the left side, and create a website and a database respectively.
For the database, make sure to choose MYSQL
, do not select others.
Download and Setup
Find a desired version to download on the releases page (I used V4.9).
After downloading, extract it to any folder, then open the file config.php
inside.
Find the following text inside and modify it according to the comments.
////////////////////////////以下选项只需在使用MySQL时填写////////////////////////////
//MySQL 数据库地址,普通主机一般为localhost
define('DB_HOST','資料庫位置');
//MySQL 数据库用户名
define('DB_USER','使用者名稱');
//MySQL 数据库密码
define('DB_PASSWD','使用者密碼');
//MySQL 数据库名称
define('DB_NAME','資料庫名稱');
Upload the Website (GearHost)
For other servers, use their respective supported methods to upload.
Enter the following commands to create a git repo.
git init
git add .
git commit -m "init"
Then, go to the newly added website page and find Deploy
, click into it.
Then, find LocalGit
below and enable it, you will see the following information.
Git URL: GITURL
Username: USERNAME
Password: PASSWORD
Enter the commands above in sequence, if prompted for a username and password, just fill them in.
git remote add deploy GITURL
git push -u deploy master
After completion, find Launch CloudSite
on the page to enter the web installation interface.
Installation
The installation interface is in Chinese, so just follow the text.
However, in the third step, it will ask if you have already set up the database, choose Yes
.
After completion, go to the homepage and log in with the admin account set up in the third step.
Scheduling
Since it cannot perform tasks (sign-in, refresh list, etc.) on its own at regular intervals, cron is needed for scheduling.
However, I think using the free service cron-job is more suitable and simpler.
Register an account on its website, then go to the Create cronjobs page to add a schedule.
Set the title as you like, and the URL should be set to /do.php
under the website.
For example: https://MY_TIEBA_CLOUD_SIGN_SERVER.net/do.php
I set the schedule to run every 30 minutes, you can adjust it according to your needs.
It is recommended not to set it to run only once a day. Because the default setting only signs in to 10 bars each time (can be adjusted in settings).
Other settings can be adjusted according to your needs, finally click Save
to save the settings.
Gravatar
Although it supports Gravatar, it uses a Gravatar mirror server located in China (which is down).
However, this can be changed, I changed it to the official one.
Find the gravatar
function in lib/sfc.functions.php
(around line 90).
Change it to the following, then re-upload and it should be fine.
function gravatar($email, $s = 140, $d = 'mm', $g = 'g', $site = 'moefont') {
$hash = md5($email);
return "https://www.gravatar.com/avatar/$hash?s=$s&r=$g";
}
Plugins
One way to install plugins is to upload the zip file directly in the admin interface.
Another way is to extract the zip file and place the folder in the plugins
folder.
The plugin folder name and the main PHP file name inside must be the same. Ex:
plugins/pch18_relist/pch18_relist.php
Using My Server
If you want to use it directly, you can go to BDTCS and use the registration code blog.maple3142.net
to register an account.
However, there is no guarantee that registration will always be open, nor is there a guarantee of stability.
- 2018/4/5 Registration open, registration code
blog.maple3142.net