/ best free open source web resources /

Graphic Resources

Web-based Chat Application with PHP and jQuery

Posted · Category: Chat, License Free

Nettus has published a tutorial of “How to Create A Simple Web-based Chat Application“. In the tutorial we will be creating a simple web-based chat application with PHP and jQuery. This sort of utility would be perfect for a live support system for your website.

The chat application includes a login and logout system, AJAX-style features, and will also offer support for multiple users. Also, you can work off this and build a multiple chat rooms, add an administrative backend, add emoticons, etc…

jQuery Chat

Requirements: jQuery Framework
Demo: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-simple…
License: License Free

  • Dorac

    Well done! I like this very much! I wouldn’t be using it any time soon, but it is great to know where an easy to use one is :D THUMBSUP!

  • glad that its built using jQuery. :)

  • good using of j-query

    thanks for this info


  • Szeim


    You don’t check the length of $_POST[‘name’].
    An attacker can inject into the session any type of large content. (the size depends on post_max_size constant in php.ini)

    So the attacker can take down your site with a nice dos:

    while (true) {
    start_a_new_session (eg. delete cookies)

    Behalf the line

    $_SESSION[‘name’] = stripslashes(htmlspecialchars($_POST[‘name’]));

    write eg.

    if (strlen($_POST[‘name’]) < 100) {
    $_SESSION[‘name’] = stripslashes( htmlspecialchars( $_POST[‘name’]));
    die(‘bad luck’);

    or something similar.

  • Szeim,

    Agreed, but instead of…
    if (strlen($_POST[’name’]) < 100) {

    It should be…
    if($_POST[‘name’] != “” && strlen($_POST[‘name’]) < 100){

    This way we can at least make sure that some sort of name is applied. If $_POST[‘name’] != “” isn’t included, anyone can login to the chat without a name.

  • Z

    Freakin awesome. thanks.

  • amir14nj14

    pleas dont speak

  • Love

    you can use preg_replace or even trim

  • Mahalakshmi


    I have create web based chat application it’s working fine but I need to separate a chat history values stored in post_id file.
    How to create it please help me…….

Supported By


Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons