【文件属性】:
文件名称:PHP-telegram-bot-API:用于Telegram-API的非官方PHP类
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-25 11:21:22
PHP
PHP-电报机器人API
用于Telegram-Bot-API的非官方PHP类
用法示例
require ( 'telegram-bot-api.php' );
$ token = 'YOUR BOT TOKEN' ;
$ bot = new telegram_bot( $ token );
设置webhook(您只需要运行一次此命令)
$ bot -> set_webhook ( 'http:/....' ); //Your url
对于未设置:
$ bot -> set_webhook ();
从webhook读取:
$ message = $ bot -> read_post_message (); //Returns a message object
从邮件收件箱中读取:
$ list_message = $ bot -> get_updates ();