|
This feature can be very handy for an advanced user.
With it you can develop an application to connect to the chat server via a socket. Then a TCP string command can be sent to operate or obtain the real-time data.
In "<123flashchat installed directory>/server/etc/groups/default/server.xml" file you will find:
<server-api enable="On">
<!-- auth-password Only commands made using the right key (password) will be authorized by the chat server and will be effective. -->
<auth-password>3874-3459-9293-2194</auth-password>
<!-- allow-access-from-ip Only commands from this IP address are legitimate. If it is set to " *", then commands from all IP address will be valid. This will not be secure. -->
<allow-access-from-ip>127.0.0.1</allow-access-from-ip>
</server-api>
The socket message string being sent is in standard syntax which will appear as shown below:
<?xml version="1.0" encoding="UTF-8"?><Command group="default" api_pwd="api_pwd_in_default/server.xml_file" type="command_type" "command_parameters
. " />
Note: Remember to terminate XML-commands with a null-byte.
group: in the standard version, the group value has to be "default"
api_pwd: this has to be the "auth-password" value which is defined in "default/server.xml".
type: this is the type of the command being sent. It could be in the following types:
"add_room", "del_room", " broadcast" " private_message ".
command_parameters: these are parameters needed for every command. They can be different for each command. These will be introduced later.
Below is an example of a command string
<?xml version="1.0" encoding="UTF-8"?><Command group="default" api_pwd="3874-3459-9293-2194" type="add_room" name="the_room_name" owner="abcd" desc="test" max="200" />
updated at 2008-2-28 |