PHP 中的即时通讯工具?

发布于 2024-09-24 23:44:45 字数 166 浏览 7 评论 0原文

我正在开发另一个项目,需要能够创建一个在线即时通讯工具,将每个人的聊天(Myspace、Facebook、Yahoo、AOL、Google 等)合并为一个,以便为用户提供一种简单的聊天方式他们所有的朋友都不需要下载任何东西。我正在考虑用 PHP 来做这件事,但我不太确定如何去做。我用谷歌搜索过这个,但找不到任何答案。

I am woking on another project, and need to be able to create an online instant messenger that combines everybody's chat (Myspace, Facebook, Yahoo, AOL, Google , etc) into one in order to provide the user with an easy way to chat with all their friends and not have to download anything. I was thinking of doing this with PHP, but I'm not exactly sure how I would go about it. I have Googled this, but wasn't able to find any answers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉栀 2024-10-01 23:44:45

您应该从这里开始研究很多事情。

  • XMPP 是大多数此类系统使用的协议。它代表 XML Presence Protocol,是发送消息的格式。
  • Jabber,是一个开源系统,许多聊天客户端都构建在其上

  • JWChat 是一个开源的、Web-基于系统,似乎大致可以满足您的需求。 http://blog.jwchat.org/jwchat/-

那里有很多信息,因此,从谷歌搜索 XMPP 开始,我想您会找到大量信息来开始您的项目。

There are a number of things that you should start looking into here.

  • XMPP is the protocol that most of these systems use. It stands for XML Presence Protocol, and is the format in which messages are sent.
  • Jabber, is an open source system that a lot of Chat clients are built on

  • JWChat is an open source, web-based system that seems to do roughly what you are looking for. http://blog.jwchat.org/jwchat/-

There is lots of information out there, so starting with a google search for XMPP I think you will find a wealth of information to start you on your project.

夏末的微笑 2024-10-01 23:44:45

Phurple 项目有些不完整,但由于它构建在 Pidgin / libpurple 核心上,可以满足您的大部分需求 /消息传递平台已经受支持,您只需使用您选择的包管理器更新 libpurple 即可保持协议的最新状态。您必须创建守护程序脚本来保持用户登录,不建议尝试在网络服务器的进程中保持连接。流程可以简单地是:

  • 生成用户登录
  • 守护进程,该进程登录到用户帐户。
  • 来自页面的进一步 ajax 请求连接到守护进程
  • 使用自定义会话处理程序,您可以在会话超时时轻松销毁守护进程。

附带说明:我不想负责保留登录名和密码。用户帐户的密码。让这些始终安全成为您的核心关注点

The Phurple project is somewhat incomplete, but as it builds on the Pidgin / libpurple core most of your requirements / messaging platforms are already supported, and you can just update libpurple using your package manager of choice to keep up-to-date on protocols. You do have to create deamon scripts to keep users logged in, it would not be advisable to try to keep connected in a webserver's process. A flow could simply be:

  • User logs in
  • Deamon process is spawned which logs in to users accounts.
  • Further ajaxy requests from page connect to daemon process
  • With a custom session handler you can easily destroy the daemon process on timeout of session.

On a side note: I would not want to be responsible for keeping logins & passwords to the users accounts. Make it your core concern that these are safe at all time

撩发小公举 2024-10-01 23:44:45

您可能想要使用现有的 IM 库。查看 Telepathy 和 libpurple。

不幸的是(或许幸运的是!)这些都不能直接与 PHP 一起工作(尽管看起来有一个 PHP DBUS 库,可以用来与 Telepathy 进行通信)。然而,Telepathy 确实有一个预制的 Python API;您可能会考虑使用 Django 或 Pylons 来开发您的应用程序。

You'll probably want to use an existing IM library. Check out Telepathy and libpurple.

Unfortunately (or perhaps fortunately!) neither of these work directly with PHP (though it looks like there is a PHP DBUS library, which could be used to communicate with Telepathy). However, Telepathy does have a pre-made Python API; you might consider doing your app using Django or Pylons.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文