YSGClient class
YSGClient class asks to certify to YggDore Sky Gate server and gets ID.
Introduction
This class includes in YggDore Sky Gate Library. When it is configured in your server, you are able to use as follows.
include_once( "YggDore/SkyGate/YSGClient.php" );
public static string YSGClient::cert( string ysgurl )

This method accesses to interface url of sky gate specified by ysgurl and returns ID.

This method throws UnexpectedValueException when error occurs.

- Argument values -
ysgurl (string) YggDore Sky Gate URL

- Return value -
(string) User ID

public static string YSGClient::certRaw( string ysgurl, array data )

This method accesses to interface url of sky gate specified by ysgurl and returns ID.

This method throws UnexpectedValueException when error occurs.

If you customizes sending data to server, this method is used instead of YSGClient::cert method.


- Argument values -
ysgurl (string) YggDore Sky Gate URL
data (array) Embed data to ysgurl
(It has the following elements)
YCIP : (string) Client IP address
YCUA : (string) Client user agent(Browser information)
YWN : (string) World name(Enable empty)

- Return value -
(array) Result information
(It has the following elements)
id : (string) ID
key : (string) key part of ID (before atmark)
world: (string) world name part of ID (after atmark)
res : (SimpleXML) Recieved XML from server
ysi : Parsed ysgurl result
YSGClient::cert method calls YSGClient::certRaw method with the following argument data.
YCIP : $_SERVER['REMOTE_ADDR']
YCUA : $_SERVER['HTTP_USER_AGENT']
YWN : (Empty)