开发者

Is there a easily embeddable chat widget that allows for user to user chat?

开发者 https://www.devze.com 2023-04-05 17:08 出处:网络
I\'m looking to add chat functionality to my site so that users of my site can chat with one another. Most chat widgets I have found online (i.e. such as the ones here) allow for chat between site adm

I'm looking to add chat functionality to my site so that users of my site can chat with one another. Most chat widgets I have found online (i.e. such as the ones here) allow for chat between site administrators and users (for the purpose of customer support). As opposed to customer support, I want chat on my site to serve as an end functional feature. Is t开发者_如何学Pythonhere a widget I can use to do this? I am looking for the simplest possible way to do this. Any pointers in the right direction would be helpful.

Thanks!


If this is low scale, where you aren't going to have hundreds of users, you may want to start with this solution:

http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-simple-web-based-chat-application/

The key here on the users side is the statement:

setInterval (loadLog, 2500);

This is where the users end in Javascript checks out if there is anything new every 2.5 seconds. Set it higher, and it won't check as often, but it also won't bug the server with the PHP code as often. This solution is easy to implement, but also has the weakness that if it gets too popular, your server host could get too many requests than it can handle.

0

精彩评论

暂无评论...
验证码 换一张
取 消