Perfect World v1.2.6 php API
Extra credits to das7002, tbnanubis, renan7899, twiggy3452, Drakaer, Ronny
Located in /includies/classPerfectWorldAPI.php (line 12)
Singleton instance of PerfectWorldAPI
Instance of MonkeyDatabase
Returns singleton instance of class
Class constructor
Gives a user GM permissions based on roles.role_name (not users.name).
Returns true or false on whether or not query succeeded.
Add user to Perfect World database
Check if e-mail exists.
Checks if the input e-mail is valid.
Fill all character data from given user ID. This will not check if data is stored already or not.
Returns a string that only contains the characters specified in $filter
Returns currently selected character's name. If no character is selected, empty string is returned.
Get character's data based on ID or currently logged in account character. If the data has already been accessed, it will return that unless forceUpdate is set to true. If empty userID and user is not logged in, function returns false.
Get character ID if character is set. 0 means that no character is set.
Return session fingerprint
Returns an array map of GMs.
Key 'GM Name' returns GM's Name Key 'Online' returns true or false to online status
Get a session variable.
NOTE: There is mild session data hiding for shared hosts. Beware using this on anything but a dedicated host. As the data could be unhidden fairly easy by another user.
Returns an array of characters from specified user ID. If no ID is put, function grabs characters from currently logged in account. If empty userID and user is not logged in, function returns false.
Get user's data based on ID or currently logged in account. If the data has already been accessed, it will return that unless forceUpdate is set to true. If empty userID and user is not logged in, function returns false.
Returns current user fingerprint (Not session fingerprint)
Get logged in user ID
Returns logged in username. If user is not logged in, empty string is returned.
Initialization components run here
Returns true or false on whether or not the user is a GM
Returns true or false on whether or not the user is logged in.
Login to an account. E-Mail parameter is optional. If you plan to use the e-mail parameter, make sure to check if the e-mail length is greater than 0, otherwise it will bypass the e-mail check and allow the user in with just username and password.
Logs out the character by destorying the session variables. The user remains in the same session until they either delete the cookie, restart their browser, or change their session ID.
Print session debug information
Set character ID for account. If set character fails, function will return false.
If the function succeeds, it will return true and the character ID will be set.
Set session fingerprint
Set login for user. Do NOT use this to log into account.
Set a session variable.
NOTE: There is mild session data hiding for shared hosts. Beware using this on anything but a dedicated host. As the data could be unhidden fairly easy by another user.
Attempt to start user session
Check if username already exists in database.
Checks if username is valid.
Verify session fingerprint against user fingerprint. Returns true if fingerprint is the same. Returns false if fingerprint mismatch.
******************************************************
Documentation generated on Sun, 12 Feb 2012 04:03:22 -0800 by phpDocumentor 1.4.1