Membership Database Integration

Popular CMS Integration Plug-ins

RealChat can be used directly with popular Bulletin Board and Content Management systems. Simply download the appropriate file and install it using the included instructions:

If your bulletin board or content management system is not listed, the following topics will help you to integrate RealChat with any existing system.

Direct Login using your existing membership information

RealChat can be easily integrated with an existing user profile or membership, database. RealChat chat urls can contain additional parameters which send additional information to the chat client. These additional parameters allow your users to skip the login screen. You attach these parameters to the standard chat urls generated within the Control Center. Parameters can be added using any server side language. ASP, PHP, and Perl are common choices, but you may use whatever you are comfortable with or whatever your existing website is written in.

The parameters are attached to the chat urls as follows:


Available parameters include:

nn nickname, URL-encoded
pu profile URL
au avatar URL
rp room password (if the room specified in the link is password-protected)
cu close URL - the url to be opened after the client exits the chat session.
hmac message authentication code (see below)

For example, to directly login a user with the nickname John, you would use:


All parameters need to be passed URL-encoded.

HMAC Protection

To prevent people from calling the client with fake user data, we strongly recommend that you enable HMAC-based client-server authentication. This is done from the Server Settings section of the Control Center.

The HMAC protection works this way:

1. A secret string is generated on the server side (the client authentication key).
2. The key is made available to the membership database scripts (PHP, ASP, ...).
3. The scripts now generate a unique code for each user.

The code is generated as follows:
md5( cpID + nickName + profileURL + avatarURL + authKey + date )

cpID is the desired client profile ID.
nickName is the desired username, URL-encoded.
profileURL is the desired profile URL.
avatarURL is the desired avatar URL.
date is the current date in YYYYMMDD format (e.g. 20070126).
authenticationKey corresponds to the Authentication Key set on server side.

4. Pass the dynamically generated code to the server by setting the hmac parameter of the chat client.
5. Upon receiving a connection request, the chat server also calculates the same hash code and verifies the login details by comparing the result to the string the client sent.


The following is a PHP code example which implements the method described above:

     * Nickname, avatar and profile URLs.
     * These are usually pulled from the database.
$nickName rawurlencode("test");   // rawurlencode is important
$profileURL rawurlencode("");
$avatarURL rawurlencode("");
     * This string must match the Authentication Key, that you
     * specified in the RealChat Control Center, Server Settings.
     * Valid chat launching link generated with the Control Center.
$link "http://chathost:port/?0,0,0,0,0";
     * Generates a HMAC-protected link, based on the source link,
     * username, avatar and profile URLS, and authKey.
function HMACLink($nickName$profileURL$avatarURL$link$authKey) {
$cpID substr(strrchr($link','), 1);
$hmac md5($cpID.$nickName.$profileURL.$avatarURL.$'Ymd'));
     * The dedicated chat URL for this user.
     * It should be used for Chat Now buttons, etc.
$hmacLink HMACLink$nickName$profileURL$avatarURL$link$authKey );
// a test
echo '<a href="'.$hmacLink.'">Chat Now!</a>';

Copyright © 1998—2007, RealChat Software. All rights reserved.