The following set of documents and sample code, PHP programs are an example.

UCenter directory structure

UCenter consist of 2 parts: server and client sides. Server directory is "upload/", the client directory id "client/". No matter how many of your website application server installed in a site, the UCenter installed only once. The client directory must exist in each application's root directory. For detailed directory structure, please see the table below:

Server: upload/

UCenter install this folder when uploading files to your server, browser, enter the "http://Web_Address/install/" for install UCenter. After installation remove the install/ directory.
control/ Application control part of the directory
data/ cache data directory, this directory and its subdirectories need to have writable permissions
images/ picture directory
install/ installation directory must be removed after installation
js/ javascript directory
lib/ application library directory
module/ application module part of the directory
view/ template directory
index.php server interface function library interface file
admin.php User Management Center, file
avatar.php Avatar Display, file

Client: client/

UCenter necessary application directory, if your application based on UCenter, then your application directory must contain the directory, the directory name can be customized (all Comsenz product corresponds to a directory named "uc_client /").
control/ Application control part of the directory
data/ Cache data directory, this directory and its subdirectories need to have writable permissions
lib/ Application library directory
module/ Part of the application module directory
client.php Interface library

UCenter interface function

UCenter divided into two kinds of interfaces: MySQL and remote connections. MySQL database is preferrable, because of a direct connection mode is faster. But UCenter service and client are not the same host and remote MySQL account is not the case, you can only use the remote connection. UCenter Interface function before you use the application's requirements under the relevant definition of the following constants:
UC_CONNECT Way to connect UCenter
mysql: MySQL method
empty: Remote method
UC_DBHOST UCenter Database Host
UC_DBUSER UCenter database username
UC_DBPW UCenter database password
UC_DBNAME UCenter database name
UC_DBCHARSET UCenter database charset
UC_DBTABLEPRE UCenter database table prefix
UC_DBCONNECT UCenter persistent database connection 0 = off, 1 = open
UC_KEY and UCenter communication key, consistent with UCenter
UC_API UCenter server URL address
UC_IP UCenter IP. Set this value when UC_CONNECT is non-mysql manner, and the current application server have a problem in resolving the domain name
UC_CHARSET UCenter character set
UC_APPID Current application ID
Use UCenter Interface library must contain uc_client/client.php interface function library files, such as checking for new short message below the code:
include './uc_client/client.php';
$newpm = uc_pm_checknew($Example_uid);
For detailed interface function instructions, see "interface functions" section.