Question

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...

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top