rssWeb Sync (mta-sync)
Category: | script |
---|---|
Author(s): | .:CiBeR:. |
Downloads: | 460 |
Rate: | You need to be logged in to vote |
Rating: | 4.5 (2 Votes) |
Description:
A simple Web-Server Sync
To make this work you need the mta php sdk that can be found here: https://wiki.multitheftauto.com/wiki/PHP_SDK
After that, you have to include the sdk like this:
<?php
include("PATHTOSDK/mta_sdk.php");
?>
After the include, you have to make a new server instance like this:
<?php
include("PATHTOSDK/mta_sdk.php");
$mtaServer = new mta("SERVERIP", SERVERPORT, ADMINUSER, ADMINPASS);
$resource = $mtaServer->getResource ( "mta-sync" );
$retn = $resource->call ( "FUNCTION",arg1,arg2 );
?>
Now, the included functions are:
[[Send message to server from Web]]
- sendWebMessage(msg)
* msg= Message to send to the server.
[[Restart resource from browser]]
- sendWebCom(cmd,arg)
* cmd: start/stop/restart
* arg: resourcename
[[Register new user from Web]]
- registerWeb(user,pass)
* user: USERNAME
* pass: PASSWORD
The resource will be updated to include more functions, please comment on what would you like it to have.
This resource needs admin rights.
To make this work you need the mta php sdk that can be found here: https://wiki.multitheftauto.com/wiki/PHP_SDK
After that, you have to include the sdk like this:
<?php
include("PATHTOSDK/mta_sdk.php");
?>
After the include, you have to make a new server instance like this:
<?php
include("PATHTOSDK/mta_sdk.php");
$mtaServer = new mta("SERVERIP", SERVERPORT, ADMINUSER, ADMINPASS);
$resource = $mtaServer->getResource ( "mta-sync" );
$retn = $resource->call ( "FUNCTION",arg1,arg2 );
?>
Now, the included functions are:
[[Send message to server from Web]]
- sendWebMessage(msg)
* msg= Message to send to the server.
[[Restart resource from browser]]
- sendWebCom(cmd,arg)
* cmd: start/stop/restart
* arg: resourcename
[[Register new user from Web]]
- registerWeb(user,pass)
* user: USERNAME
* pass: PASSWORD
The resource will be updated to include more functions, please comment on what would you like it to have.
This resource needs admin rights.
Version history
Version | Publish Date | Changes | |
---|---|---|---|
1.0.0 | 2015-03-14 18:18:25 | First public release | Download |