I'm looking for a tool to implement a live chat between customers and support.

Many scripts I've found (at TotalScripts.com and HotScripts.com) works on an IRC layout and it's not exactly what I want.

The tool must work like this:

Customer side - A small popup where customers type their names and start chatting with support.

Support side - A manager that allows user to chat privately with many customers.

Does anyone knows any PHP script that does it?

    I doubt you'll find one exactly fit to your needs. You'll probably have to make one. Since you already know what you want, it should be easy enough, you just need to find out how make it. 🙂

    First steps first: the layout:
    This is most definitely going to require a frame. An upper frame for the chat text, and a bottom frame to enter text. If everything were to be on the same page, then all entered text would be lost when it refreshes. This way, you can continue to type even as the page reloads.

    Next, the client's login:
    This could easily be a single cookie: setCookie ("username", "$username", 10);
    After the client logs in, a request would be sent to support, and support would essentially "log in" to the client's conversation. The easiest way to do this is to store the entire chat in a file, and keep refreshing. To obtain the refreshing every 10 or so seconds, simply use something similar:
    <meta http-equiv="refresh" content="0;URL=index.php">

    Keeping track of text:
    When the client logs in, text will have to be stored somewhere. A file named after the client will ensure that no others will be able to hear the conversation. After text is sent, simply write to the file:
    $fp = fopen($_COOKIE["username"],"a+");
    fwrite($fp,"\n".$username."> ".$text);
    fclose($fp);

    Then, if support writes text:
    $fp = fopen($_COOKIE["username"],"a+");
    fwrite($fp,"\nSupport> ".$text);
    fclose($fp);

    There you have it, a very rough sketch. This should be enough to at least get you started. Try looking at the code of some other programs to see how they are functioning.

      8 days later

      If you are a still looking for a live support script let me know and I can let you have mine.

        6 months later

        dear
        faraco
        i ant same thing plsease send me too if you maneged to get it.
        omcdac1@yahoo.co.uk
        bye abd thanks in advance.

          Write a Reply...