»Technical toss»Use free space to create a chat robot similar to a pea pod (II)
Thanks for Giuem's open source sharing: the source code of the post bar chat robot!Welcome
preface
I have published articles like Peapod chat robot before. This time, the code content has been greatly updated, and the quality is much better than the previous one.
1. Fill in the information (bduss, id, database) in config.php. The sae user does not need to fill in the database information.
2. Open the domain name/install.php installation database.
3. Set cron.php's cron.
Specific use method
SAE user please stamp the link → _ → Post bar robot SAE building method This article focuses on the methods of building chat robots in free space.😎 😎 😎
process
Create PHP space
Get Baidu BDUSS
Download the source code and edit it (download is provided at the end of the source code text)
The source code is available for download at the end of the document. During code editingEdit code, please complete UTF-8 encoding!!! Just edit the config.php file
FTP upload file
There are two types of FTP managers: client and online FTP managers
1,CrossFTP Pro , personal use of 8UFTP (download address) Fill in the secondary domain name, user name and password of the previously obtained space on the FTP software, and click the link
After the link is successful, select all the edited files on the left, right click, upload, OK
If you are going to use the client to upload files, skip the following
2,Online FTP Manager, directly stamp the link → _ →Online FTP Manager After opening, fill in the user name and password
Enter the public_html path and click the upload button to start uploading files
Select to upload compressed file(You need to recompress the edited application file in zip format.)
Select the file and click unzip to unzip it.
[box style="warning"] The FTP client has two modes: online FTP, which you can choose, but the client is simpler. I personally use the client upload.[/v_notice]
Install app
The installation is very simple. Just enter the application pathname+install.php. For example, my previousikk.hol.es/chat/install.phpThe following figure shows that the installation is successful
If not, check whether there is any problem in filling in the database
Add Scheduled Task
I use Uptime Robot to plan tasks(What is Uptime Robot) Add the file path of corn.php, such as myikk.hol.es/chat/cron.php
end
After installation, you can try to use your chat robot with other numbers to see if it works. This application only comes with a simple tuning command [Q: Question A: Answer] @ xxx
Postscript
This little robot has just come out, and there must be many problems. Don't expect it to become a pea pod all of a sudden. It's just for fun
Update log
On August 30, 2014, multiple robot interfaces were added
@Win7 experts 32It's still fast. It takes me 5 minutes to do it every time, and I can do it every second. I see the client reminding me that the robot has replied, and too soon will cause recovery failure or account abnormality
@Clouds fallHmm, after building the vps in azure, cron got stuck. Ask once, return a hundred times, and more than a few posts
@Win7 experts 32Is this Microsoft's cloud platform?I heard of it, but I didn't use it. I also made one in JAE, but I didn't find the cron setting in JAE
@Clouds falltwo thousand three hundred and thirty-three
@Clouds fallMicrosoft is very good. You can set up websites, vps, databases, and tasks
@Cold starIt's normal to have a verification code. You can reduce the frequency. High frequency continuous replies will definitely have a verification code. If you can't fill in a verification code yourself, you'd better use it in the bar that doesn't need a verification code