Home  >  Article  >  Backend Development  >  PIGCMS How to turn off the chatbot, pigcms chatbot_PHP tutorial

PIGCMS How to turn off the chatbot, pigcms chatbot_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:07:02997browse

PIGCMS How to turn off the chatbot, pigcms chatbot

Examples of mindless operations

1. Find the WeixinAction.class.php file, path: your version PigCmsLibActionHome

2. Query function chat and modify the return value in the chat() function

Copy code The code is as follows:

return 'str_replace('highsea', 'hi', $str)';//For example

is, as follows:
return 'Dear, please wait for the customer service reply~';

3. (Optional) Finally comment out the "little yellow chicken" part (you can leave it uncommented):

Copy code The code is as follows:

/*Little Yellow Chicken*/
/*$str = 'http://api.bd001.com/iMicms_com/api.php?key=free&appid=0&msg=' . urlencode($name);
$json = Http::fsockopenDownload($str);
if ($json == false) {
$json = file_get_contents($str);
}
$json = json_decode($json, true);
$str = str_replace('HighSea', $this->my, str_replace('Tip:', $this->my . 'Remind you:', str_replace('{br}', "n", $json ['content'])));*/

•Summary: This operation will not affect the replies of other keywords in the public account. It only responds to questions that cannot be answered (originally a request for Xiaohuangji): "Dear, please wait for the customer service reply~"; if necessary Modify other operation source codes

•If you optimize it, you can do this:

First configure a unified answer (or request your own interface server), and then request the interface of the little yellow chicken when the visitor replies like "little yellow chicken"... The source code will not give an example~

Have you learned how to turn off the chatbot in PIGCMS? I hope this article can be helpful to you.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/957130.htmlTechArticlePIGCMS How to turn off the chatbot, pigcms chatbot brainless operation example 1. Find the WeixinAction.class.php file, path : Your version PigCmsLibActionHome 2. Query fu...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn