建立类似 Omegle 的东西

发布于 2024-12-16 01:24:50 字数 244 浏览 4 评论 0原文

我想在网站上实现一个类似 Omegle 的聊天系统,它将在聊天室中匹配 2 个人。

问题是我不知道仅使用 PHP 和 MySQL 是否可行,因为这些是我迄今为止学到的唯一编程语言。

那么问题来了:

用PHP和MySQL可以开发这样的东西吗?

如果不是还需要什么?

谢谢

。我听说过node.js和socket.io,但如果有另一种方法的话,我宁愿避免花时间学习这两个......

I want to implement a Omegle like chat system on a website, which will match up 2 people in a chatroom.

The problem is that i don't know if this is possible with just PHP and MySQL, because these are the only programming languages i have learned so far.

So the question is:

Is it possible to develop such a thing with PHP and MySQL?

if not what else is needed?

Thanks

ps. i have heard about node.js and socket.io, but would rather avoid using my time learning those two if it there's another way...

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

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

发布评论

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

评论(1

再见回来 2024-12-23 01:24:50

是的,如前所述,您可以使用 Javascript 或 jQuery 之类的库来处理它,或者您可以尝试使用预构建的聊天系统。 http://phpfreechat.net

在随机配对方面,您可以将所有活动会话存储在数据库中只要他们要求,就随机配对。也许有一个被设置的 BOOL is_requesting_chat

Yes, as mentioned, you could use Javascript or a library like jQuery to handle it or you could try using a pre-built chat system. http://phpfreechat.net

In terms of randomly pairing, you could store all of the active sessions in a database and randomly pair them as long as they are requesting one. Perhaps have a BOOL is_requesting_chat that gets set.

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