PHP Chat Bot:Google Talk [英] PHP Chat Bot: Google Talk

查看:132
本文介绍了PHP Chat Bot:Google Talk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何通过特殊客户端为Google Talk创建聊天机器人。

我知道它使用XMPP发送消息,但我不知道如何使用它。我的理解是,如果我要创建自己的客户端页面,并且会使用我的数据解析聊天记录,我应该可以创建一个bot,在我离开时聊天。如果我想创建一个自定义客户端,那么我该从哪里开始?我怎样才能以一种设置的方式解析消息和自动回复?我的预期用法是:当我是AFK时使用自动应答,并带有一个体面的AI(我可以制作)。

我可以在PHP中使用这个协议来制作我的机器人,或者必须是基于java或python的吗?



感谢您的任何和所有帮助!!!

解决方案

xmpphp 库应该会对您有所帮助。看看例子。



PHP绝对是我用于这样的最后一种语言(好吧,我不会在awk或sed中使用它)或者),但是如果你开始使用它,你可以。


I was wondering how to create a chat bot for Google Talk via special client.

I know it uses XMPP to send messages, but I do not know how to use this at all. It is my understanding that I should be able to make a bot which chats for me when I am away if I were to create my own client page, which would parse the chats with my data. Where would I begin if I wanted to create a custom client, and how could I make it parse messages and autorespond in a set manner? My intended usage: autoresponder for when I am AFK, with a decent AI (which I can make.)

Can I use this protocol with PHP to make my bot, or must it be java or python based?

Thanks for any and all help!!!

解决方案

The xmpphp library should help you. Have a look at the examples.

PHP is absolutely the last language I would use for something like this (well, okay, I wouldn't do it in awk or sed either), but if you're set on using it, you can.

这篇关于PHP Chat Bot:Google Talk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆