Chat script?

Discussion in 'PHP' started by mokimofiki, Sep 16, 2008.

  1. #1
    I am just wondering if there is a basic free chat script that is very simple out there. Like only consists of a textarea, input box, and send button.

    A tutorial would be better but a prewritten script will work as well :)

    EX:
    <textarea name="chatwindow" value="Welcome to the Lobby..." rows="15" cols="85"></textarea>
    
    <br><br>
    
    <input type="text" name="typed" style="width: 650px"> <input type="submit" value="Send">
    Code (markup):
    Obviously this has to do something lol.

    Thank you in advance,
    Moki
     
    mokimofiki, Sep 16, 2008 IP
  2. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #2
    nobody? Ideas would be nice as well, I don't necesarily need anything handed to me?
     
    mokimofiki, Sep 16, 2008 IP
  3. Daler

    Daler Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you mean like a shoutbox?

    I think I have a code for a simple one.
     
    Daler, Sep 16, 2008 IP
  4. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #4
    That would probably work yes ... its just so that people at a website can ask a support question between certain times and get fast responses from anybody that has the page open
     
    mokimofiki, Sep 16, 2008 IP
  5. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #5
    bump :)

    I am really curious on how to make these
     
    mokimofiki, Sep 17, 2008 IP
  6. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Okay I have found a few free ones that are pretty complex ... all I want is one that has a chat box (or shoutbox whatever its called) and an input field and send button.

    Maybe If someone can explain to me how to in php take input from a user and desplay it in a global area for everyone on the page to see. maybe stored in a text area and page refreshes when send is clicked.

    Really anything would help to get me started.
     
    mokimofiki, Sep 18, 2008 IP
  7. fireworking

    fireworking Peon

    Messages:
    460
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can google for them. Im pretty sure you can get one.
     
    fireworking, Sep 18, 2008 IP
  8. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #8
    It is not that difficult, but lot of code. This is not code, but an idea to get you started :)

    1> Make a table in database(DB) 4 fields (id autoincrement, user_name char(10), message text, is_read char(1))
    2> Take user input in a textarea, and put in that table above.
    3> using a js (ajax) function which runs every 10-20 seconds, show this new unread message on page you want. This should also update is_read to "R" (read)

    Then anyone/ any specified person can reply using the same way as above. They enter message (store it), js shows it, and marks read, and so on.

    If you use text files instead of database, this will work faster, less server load, but more trouble managing things.
    regards :)
     
    JEET, Sep 18, 2008 IP
    webrickco likes this.
  9. classic

    classic Peon

    Messages:
    96
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    As JEET said this is complicated, basically you need simple IM clients + IM server ;)

    And it is hard task to do not a simple one. There are surely lot of free Java applets that can do a job for you ...
     
    classic, Sep 19, 2008 IP
  10. webrickco

    webrickco Active Member

    Messages:
    268
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #10
    webrickco, Sep 19, 2008 IP
  11. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #11
    Thank you all for your responses I have a great starting ground and will upload my code as I get progress on it for everyone to see and use if needed :)
     
    mokimofiki, Sep 23, 2008 IP