-
-
Notifications
You must be signed in to change notification settings - Fork 4
PhpManager
This class provides methods to dialog with php files. To implement the methods of this class you need a server to host php files and a database. Php files and MySQL query to create the appropriate table are provided in the GitHub repository.
Try to contact server and, if the connection is successful, set url to mega archive in megaurl
and the tag of the last version available in lastVer
. This method should not be used if the game is stored in a GitLab repository, in that case version tag can be retrieved with XVLauncher.UpdateHandler.GetLatestRelease, while megaurl
is no more useful.
true
if the conncection is successful, false
otherwise.
Assign to user a new auto-increment ID.
Name | Description |
---|---|
version |
System.String current game version tag. |
ID.
Getter method for lastVer.
Last version available.
Getter method for PhpManager.megaUrl.
Store error message in last_error column. Also update error_date column with current timestamp.
Name | Description |
---|---|
error |
System.String Error message. |
Helper method provided by makim on this Stack Overflow thread: https://stackoverflow.com/questions/6960426/c-sharp-xml-documentation-website-link.
Name | Description |
---|---|
url |
System.String |
postData |
System.String |
report |
System.Boolean In case of Exception, don't call ReportError if it is false . Default is true , but in some cases it can be useful to set it to false to avoid loops. |
webpage content.
Update user current version in the database. Since in the database the column last_date is setted as ON UPDATE CURRENT_TIMESTAMP, this method can also be used to update that column. For example, it can be called whenever the game is launched, so the database will register the last time each id has launched the game. It can be useful to know if someone is still playing the game (using the application/using whatever this launcher is used to) after months or years.
Name | Description |
---|---|
newVer |
System.String User current version. |
Set it to true if you want to use php files to communicate with your server. Check the documentation for more details.
Wiki work in progress, please feel free to contribute!