标签: tg

  • 基于thinkphp开发的TG电报机器人系统,支持关键词回复

    基于thinkphp开发的TG电报机器人系统,支持关键词回复

    搭建教程:
    1、上传文件到服务器
    2、PHP > 7.0
    3、设置伪静态(具体可以参考Thinkphp框架安装方法)


    location / {
        if (!-e $request_filename){
            rewrite  ^(.*)$  /index.php?s=$1  last;   break;
        }
    }

    4、选择网站运行目录为Public
    5、配置数据库(在application/database.php)
    6、导入数据库
    7、后台地址: 您的域名/admin
    账号:admin 密码:123456

    使用方法:
    1、创建机器人
    Tele-gram里联系botfather,它会提示你用tele-gram打开。然后你就打开了botfarther的聊天对话框。输入:

    /newbot

    回车发送,botfarther会反馈

    Alright, a new bot. How are we going to call it? Please choose a name for your bot.

    输入你要创建的bot名字。例如:

    weixiaolive.com_bot

    回车发送,它会反馈

    Good. Now let’s choose a username for your bot. It must end in bot. Like this, for example: TetrisBot or tetris_bot.

    我再输入 例如:

    DavidBot

    这是这个机器人的名字。它会反馈:

    Sorry, this username is already taken. Please try something different.

    这名字已经被用了。我们换一个即可,当反馈 :

    BotFather, [16.02.17 14:23] Done! Congratulations on your new bot. You will find it at t.me/Gz_David_Bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you’ve finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this. Use this token to access the HTTP API: xxx:xxx(此处为您的Token,复制它)

    时为正常,如果更换密钥请重新执行2、3步骤即可!