SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy what are true steps to make my phplive chat(one to one) be more fast and flexible ?

    hello ,

    i maked simpe php livechat (one to one) using php&jquery ,
    i use jquery to send every 1 second request to mysql to fetch any last new chats and paste it in the chat screen , but i thing it late some thing , and cause the browser to be slowely some thing , so help me with your ideas to improve my script , i think to save any new chat in javascript variable and paste direct in the chat screen , and every 10s send request to insert new chats in the mysql , but i don't know if this method is save or no

    so plz help me

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://en.wikipedia.org/wiki/Comet_(programming)
    long polling is probably simplest. Make sure to handle requests which time out.

    You may need to adjust webserver and database configuration to handle the potential large number of concurrent connections(one for each user until they leave).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •