w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
   » Home » Chatbot
Using JavaScript and PHP to create a chatbot
This can be done using web sockets. A quick google search yields a php library called Ratchet Web sockets essentially create a tunnel between the server and the client so that the server can push/broadcast to all clients. For example when a user types a message and sends it to the server, the server could then broadcast it to all of the clients. This was you don't have to have javascript constantly polling for updated messages. I don't have experience with Ratchet but I do have experience with web sockets. I would combine it with some sort of front end javascript framework such as backbone.js

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.