mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9466] Implemented SOAP in MaNGOS
- 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
This commit is contained in:
parent
844f032458
commit
e520d8409e
33 changed files with 20337 additions and 96 deletions
34
contrib/soap/example.php
Normal file
34
contrib/soap/example.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?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();
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue