Even if the chat and the website are placed on different servers, the chat users can enter the 123 Flash Chat room without double registration or double login, provided that they have logon your website already. This is called external database integration, and it can be deployed in the following two ways: 1. Auth URL (the simple and recommended way) The whole scenario is that the chat server will communicate with the external database through a dynamic application, like PHP, ASP, ASP.net or JSP. The auth-url is the abbreviation of authentication URL. It is simple and stable, therefore recommended method to accomplish the integration. It requires you to be familiar with your own database, and capable of coding dynamic webpage. The sample of the auth-url dynamic webpage is available, simply send email to support@123flashchat.com to request. Explicitly, the Auth-URL application will perform as the communication medium of the chat server and the database. Ie: when a user tries to log in the chat server, the server won’t connect to the user database directly, but will send the username and password to the auth-url, then the auth-url requests the database to authenticate the user. Then the auth-url will return the feedback to the chat server in a predefined way, whether approved or declined. Auth URL Output: (What does each number means regard of the authentication result.) 0 - login successfully; 1 - wrong password; 2 - the username can't be used; 3 - login error 4 - username does not exist 5 - successfully log in as an administrator Note: Dealing with guest login, the auth-url will get no password and failed to find any username in the database, in that case, auth-url should respond 4 to ensure the user to enter chat room smoothly, otherwise if respond 0,1 or 5, the chat server will decide the username is already taken and decline the user’s connection effort. Configuration 1. Coding auth-url based on the sample application. 2. login the Admin Panel 3. System Setting -> Integration Panel 4. choose "AuthURL", and fill in the right address of it. 2.JDBC Integration It is direct integration of the chat server and the user database, through JDBC driver, which is abbreviation of Java DataBase Connectivity standard. This way is for advanced user who not only understands how to connect database using JDBC driver, but also is capable of performance tuning to handle high traffic. Configuration: 1. Firstly you need to check the existing database of your website, then configure the corresponding XML under this folder: <123flashchat installed directory>/etc/groups/ <group name>/database/, ie: - For Mysql, configure Mysql.xml - For Oracle, configure Oracle.xml - For Sql Server, configure ODBC.xml - For the other database, configure Common.xml a) Mysql.xml Parameter | Type | Description | database-host | string | The hostname of the database server. | database-name | string | The database name you are using. | database-user | string | The user name which is required to connect to the database. | database-password | string | The password which is required to connect to the database. | user-table | string | The table to store the user information. | username-field | string | The column of names of the user names in the user-table. | password-field | string | The column of names of passwords in the user-table. | enable-md5 | string | It defines whether the password is encrypted with MD5. On - encoded. Off - not encoded. Passwords in many portal systems and forum systems like php-nuke, post-nuke or phpBB, etc. are encrypted with MD5, thus you will need to set this value to 'On'. | connection-pool->pool-size | number | Maximum number of pooled database connections, or 0 for no limit. | connection-pool-> max-size | number | Maximum number of possible database connections , or 0 for no limit. | connection-pool-> init-num | number | Initializes the given number of database connections. | connection-pool->expiry-time | number | Expiry time (milliseconds) for pooled database connections, or 0 for no expiry. |
b) Oracle.xml Parameter | Type | Description | mode | string | It could be "thin" or "oci" only. It indicates the way to access the database. The default value is "thin". If you choose "oci", then your server must have installed an oracle client. | database-host | string | The hostname of the database server. | database-port | number | The port of the database. | database-sid | string | The sid of the database server. | service-name | string | The service name to connect to oracle. It doesn't take effect unless you choose the mode "oci". | database-user | string | The user name which is required to connect to the database. | database-password | string | The password which is required to connect to the database. | user-table | string | The table to store the user information. | username-field | string | The column name of user names in the user-table. | password-field | string | The column name of passwords in the user-table. | enable-md5 | string | It defines whether the password is encrypted with MD5. On - encoded. Off - not encoded . Passwords in many portal systems and forum systems such as php-nuke, post-nuke or phpBB, etc. are encrypted with MD5, thus you will need to set this value to "On". | connection-pool->pool-size | number | Maximum number of pooled database connections , or 0 for no limit. | connection-pool-> max-size | number | Maximum number of possible database connections , or 0 for no limit. | connection-pool-> init-num | number | Initializes the given number of database connections. | connection-pool->expiry-time | number | Expiry time (milliseconds) for pooled database connections, or 0 for no expiry. |
c) CommonDB.xml Parameter | Type | Description | jdbc-driver | string | The name of the jdbc driver. | jdbc-url | string | The complete jdbc URL. If the user name and password are required when the database is accessed, they must also be included. | user-table | string | The table to store the user information. | username-field | string | The column name of the user names in the user-table. | password-field | string | The column name of passwords in the user-table. | enable-md5 | string | It defines whether the password is encrypted with MD5. On - encoded. Off - not encoded . Passwords in many portal systems and forum systems such as php-nuke, post-nuke or phpBB, etc. are encrypted with MD5, thus you will need to set this value to "On". | connection-pool->pool-size | number | Maximum number of pooled database connections , or 0 for no limit. | connection-pool-> max-size | number | Maximum number of possible database connections , or 0 for no limit. | connection-pool-> init-num | number | Initializes the given number of database connections. | connection-pool->expiry-time | number | Expiry time (milliseconds) for pooled database connections, or 0 for no expiry. |
2. login the Admin Panel 3. System Setting -> Integration Panel 4. Choose a specific database and submit. If error occurred, please double check the configuration and re-submit. Sample: |