WebAppers

/ best free open source web resources /

Shopify

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

9 Comments
  • 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!

  • http://fedmich.com/life fedmich

    glad that its built using jQuery. :)

  • http://www.bulkagro.com/ jatropha

    good using of j-query

    thanks for this info

    thanks

  • Szeim

    Hi!

    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)
    post_a_large_content
    }

    Behalf the line

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

    write eg.

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

    or something similar.

  • http://roffle.us/ Kevin

    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.

  • http://giantsquidstudios.com Z

    Freakin awesome. thanks.

  • amir14nj14

    pleas dont speak

  • Love

    you can use preg_replace or even trim

  • Mahalakshmi

    Hi,

    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

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons