Language: ChineseGermanSpanishFrenchDutchItalianRussian 
Home
Tutorials

Data API List

1). Get Rooms Data API

This API is used to get the room list from the HTTP server of the chat.

  • Request

    Data API name: rooms(.js or .xml)

    Request URL: <123 Flash Chat HTTP server IP or domain>:port/

    HTTP get parameters:

    group: group name (eg: group=default)

    listrooms: specify the return room list by room’s ID, room’id split by "," (eg: listroom=1,2,3)

    These two HTTP get parameters are not obligatory to follow the HTTP request URL.

  • Response

    Response Data Attributes Description:

    id: uniquie id

    name: name

    max: max user limit

    desc: description

    count: current users amount

    owner: moderator list, split by ","

    speaker: speaker list, split by ","

    wm: welcome message

    memberonly: whether the unregistered guest has the permission to enter or not.

    passallmessage: whether to activate the moderated-chat module or not (0 means disabled / 1 means activated.)

    en: room status is open or close (0 means closed / 1 means opened)

    st: it determines the room will only be displayed in the avatar chat client, or in the text chat room list as well. (0 means displayed in text chat room list too, 2 means only displayed in the avatar chat client side.)

    JavaScript Response Data Format:

    var rooms =[];

    XML Response Data Format:

    <rooms> <room en="1" name="General Test" id="1" owner="admin" memberonly="0"
    desc="Tip: Here you may test enter, exit room, private chat, etc." count="0" passallmessage="1" pwd="0" max="200" wm="" st="0" speaker=""/> </rooms>

  • JavaScript Example

    The following HTML code will display the rooms' names, it can be copied and pasted to a new HTML file and run smoothly.

    <html>
    <head>
    <script language="javascript" src="http://localhost:35555/rooms.js"></script>
    </head>
    <body>
    <script language="javascript">
    document.write("Rooms List: <br/>");
    var roomsLength=rooms.length;
    for(var i=0;i<roomsLength;i++)

    </script>
    </body>
    </html>

  • XML Example

    You could use any program language to request the URL: http://localhost:35555/rooms.xml, and parse the XML response.

  • 2). Get Room Online Users API

    This API is used to get the user list of a special room from chat HTTP server

  • Request

    Data API name: roomonlineusers(.js or .xml)

    Request URL: http://<123 Flash Chat HTTP server IP or domain>:port/

    HTTP get parameters:
    group: group name (eg: group=default)
    roomid: specify to get which room's user list (eg: roomid=1)

    These two HTTP get parameters are not obligatory to follow the HTTP request URL.

  • Response

    Response Data Attributes Description::
    name: user's name
    nickname: user's nickname

    JavaScript Response Data Format:
    var roomonlineusers=[];

    XML Response Data Format:
    <roomonlineusers>
    <user nickname="owen" name="owen"/>
    </roomonlineusers>

  • JavaScript Example

    The following code will display the user's nickname in a room, you could copy and paste thefollowing code into a new html file and run it.

    <html>
    <head>
    <script language="javascript" src="http://localhost:35555/roomonlineusers.js"></script>
    </head>
    <body>
    <script language="javascript">
    var roomOnlineUsersLength=roomonlineusers.length;
    document.write("Room Online User List: <br/>");
    for(var i=0;i<roomOnlineUsersLength;i++)

    </script>
    </body>
    </html>

  • XML Example

    You could use any program language to request the URL: http://localhost:35555/ roomonlineusers.xml, and parse the xml response.

  • 3). Get Online API

    This API used to get the group chat connections, logon users and chat rooms.

  • Request

    Data API name: online (.js or .xml)

    Request URL: http:// <123 Flash Chat HTTP server IP or domain>:port/

    HTTP get parameters:
    group: group name (eg: group=default)
    This HTTP get parameters are not obligatory to follow the HTTP request URL.

  • Response

    Response Data Attributes Description:
    cn: chat connections
    ln: logon users
    rn: chat rooms

    JavaScript Response Data Format:
    var online =;

    XML Response Data Format:
    < online ln="1" cn="2" rn="10" />

  • JavaScript Example

    The following html code will display the group chat connections, logon users and chat rooms, you could copy and paste following code to a new html file and run it.

    <html>
    <head>
    <script language="javascript" src="http://localhost:35555/online.js"></script>
    </head>
    <body>
    <script language="javascript">
    document.write("Chat connections: "+ online.cn);
    document.write("<br/>");
    document.write("Logon users: "+ online.ln);
    document.write("
    ");
    document.write("Chat rooms: "+ online.rn);
    </script>
    </body>
    </html>

  • XML Example

    You could use any program language to request the URL: http://localhost:35555/online.xml, and parse the XML response.

  • Tutorials
    123flashchat
    123flashchat
    promotion
    123flashchat
    promotion
    123flashchat
    123flashchat
    123flashchat
    Service
    123flashchat
    123flashchat
    7*24 Live Support
    Submit a Ticket
    +86-21-51785636 (China)
    +1-858-866-9362 (USA)
    123flashchat
    Home | About | Demo | Features | Download | Order | FAQ | Support | Reviews | Affiliate | Links | Sitemap | Forum | Blog

    Flash Chat | Java Chat Server| Chat Server Software| Instant Messaging Software| Live Help Chat
    Webcam Chat | Web Chat Room | Enterprise Messaging | Enterprise Chat Software| Flash Chat in China
    Legal Disclaimer | Privacy Statement | Terms of Use Copyright © 2001-2008 TopCMM Software Corp. All Rights Reserved.