mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
- removed deprecated code from RASocket
- allow more than one login at a time on the RA console
- added gsoap library for handling SOAP requests
- removed deprecated mangos_string entry
Thanks to:
- Derex for reporting a bug which occured if more than 1024
players were connected [poll() vs select()]
- caeruleaus for adding windowsbuild support
- vladimir for suggesting a different thread starting order
- fdb_ for suggesting SOAP in the first place
34 lines
666 B
PHP
34 lines
666 B
PHP
<?php
|
|
/*
|
|
* MaNGOSsoap client example
|
|
*
|
|
* a simple example how to invoke commands using SOAP
|
|
*/
|
|
|
|
$username = 'ADMINISTRATOR';
|
|
$password = 'ADMINISTRATOR';
|
|
$host = "localhost";
|
|
$soapport = 7878;
|
|
$command = "server info";
|
|
|
|
$client = new SoapClient(NULL,
|
|
array(
|
|
"location" => "http://$host:$soapport/",
|
|
"uri" => "urn:MaNGOS",
|
|
"style" => SOAP_RPC,
|
|
'login' => $username,
|
|
'password' => $password
|
|
));
|
|
|
|
try {
|
|
$result = $client->executeCommand(new SoapParam($command, "command"));
|
|
|
|
echo "Command succeeded! Output:<br />\n";
|
|
echo $result;
|
|
}
|
|
catch (Exception $e)
|
|
{
|
|
echo "Command failed! Reason:<br />\n";
|
|
echo $e->getMessage();
|
|
}
|
|
?>
|