建立类似 Omegle 的东西
我想在网站上实现一个类似 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,如前所述,您可以使用 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.