Jump to content

Need Guidance For Live Chatting Code In Php


kunal_kagalkar

Recommended Posts

I'm not sure if PHP is the most indicated language for that. For a chat application you need a listener on the server, and another one on each client. The server is constantly listening for signals from the clients, and then sending data back to the clients. This is done with Sockets.PHP has the fsockopen() function, but you couldn't just do that from a PHP page, you'd need to run a PHP application from a command prompt. Most hosting services won't allow you to have a listener on the server-side, or they'll charge you a whole lot for the bandwidth.It's better to have a Java or C++ application listening on the server-side and Flash or a Java applet on the client.

Link to comment
Share on other sites

I'm not sure if PHP is the most indicated language for that. For a chat application you need a listener on the server, and another one on each client. The server is constantly listening for signals from the clients, and then sending data back to the clients. This is done with Sockets.PHP has the fsockopen() function, but you couldn't just do that from a PHP page, you'd need to run a PHP application from a command prompt. Most hosting services won't allow you to have a listener on the server-side, or they'll charge you a whole lot for the bandwidth.It's better to have a Java or C++ application listening on the server-side and Flash or a Java applet on the client.
Thanx for replyThen how can other languages are done live chat in pages?
Link to comment
Share on other sites

There is always an option of chatting where one page is split into two frames, one frame for posting the message, then the other frame (often top frame) for the receiving of message (which refreshes every minute or so) and retrieves the last 5 messages or so from a database?(obviously when posting a new message it will have to be sent to a database)Although I'm not sure if this is any use it was just an idea for you to possibly consider?If you want more information i'd be happy to help?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...