How would I go about creating a life chat support page for my website?

by on October 25, 2009

Q: I am considering putting a live support page on my almost-completely-php site. I have worked with system-style (analysis, antivirus engineering etc) programming for close to 10 years and am most familiar with VB type of chat clients. I know that ajax is required for something like this, but do not know how to build something that is just a basic chat system with a send button, sender name and time, and 2 colors for client and staff. Also, what about creating a time-out function on the page? I did download a trial version of something but it came with a lot of bells and whistles and not even the owners of this package could get it set up all the way during the free trial.

Does ajax create a lot of overhead on the client side? I have unlimited bandwidth and space on my account, with a T3 connection, however, my target audience will most likely be on the lower end of about 6mb with a few maybe on dialup. FYI, this site is still being programmed, so the core information is yet to be started.

Can I use ajax to create a page that is like an auto-refreshing php code? For auditing purposes like a hit counter on my side (personal home computer, not the server), with much information displayed in a template?

Large questions, I know. I hope this isn’t out of the scope of just a Q&A site.


2 Responses to “How would I go about creating a life chat support page for my website?”
  1.  

    You could certainly use ajax to do this. You would have the javascript code (ajax) just poll the server every few seconds to see if there is a new message from the support person. You would also have code that would run when the client hits the submit button and that that response would be sent via ajax back to the server.

    It would work the same on the support persons side where they would poll the server for new information every few seconds and when they hit submit they would send over the data.

    The finance site on google.com is a great example of how to use ajax for a good user experience and you will notice it should work just fine over every type of network because the amount of data that is sent is very small.

    I would actually suggest using a service though instead of writing your own code for it.. The cost of a service like live support is usually only around $100 a year, which is a great deal considering how long it would take to actually write something yourself.

     
  2.  
    Picked as best answer

    It didn’t take me but a day once I learned how to use javascript to load pages in the background and parse the html. Basically I ran it to a php file which took data and generated an “echo” command as well as a “fwrite” for record’s sake. the php file fwrite’s xml-format information for code, time, zone, body and sender into a file system of “/System Logs/Live Chat/Sessions/$date/$ip.txt” The status code is also capable of being used for disconnect alert boxes etc.