魔兽世界私人服务器SOAP问题

时间:2015-08-04 02:06:01

标签: php apache soap

您好,我的WoW Private服务器出现了一些问题。 Worldserver是一个魔兽世界私人服务器的控制台,在worldserver上我试图使用SOAP函数将命令从我的网站发送到worldserver但是当我尝试使用它时我得到了这个错误:

  

致命错误:未捕获的SoapFault异常:[SOAP-ENV:Client]方法   ' NS1:executeCommand'未实现:方法名称或名称空间不   在C:\ Users \ SERVER \ Desktop \ Crusader中识别   WoW \ Server \ XAMPP \ htdocs \ index.php:33堆栈跟踪:#0   C:\用户\ SERVER \桌面\十字军   魔兽世界\服务器\ XAMPP \ htdocs中\的index.php(33):   SoapClient-> __ call(' executeCommand',Array)#1   C:\用户\ SERVER \桌面\十字军   魔兽世界\服务器\ XAMPP \ htdocs中\的index.php(33):   SoapClient-> executeCommand(Object(SoapParam))#2 {main}抛出   C:\ Users \ SERVER \ Desktop \ Crusader WoW \ Server \ XAMPP \ htdocs \ index.php on   第33行

您可以visiting自行尝试 当您尝试创建帐户时,您将收到错误。

这是我的index.php代码:

<?php
if(isset($_POST['submit'])) {
$soapUsername = 'bredegard';
$soapPassword = '123';
$soapHost = '127.0.0.1';
$soapPort = '7878';
$dbhost = "127.0.0.1";
$dbuser = "root";
$dbpass = "ascent";
$dbname = "realmd";
error_reporting(E_ALL);
$username = $_POST['username'];
$password = $_POST['password'];

$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);

$sql = "SELECT * FROM account WHERE username = '" . $_POST['username'] . "'";
$result = $conn->query($sql);

if ($result->num_rows > 0) {

} else {
$client = new SoapClient(NULL, array(
    'location' => "http://$soapHost:$soapPort/",
    'uri'      => 'urn:TC',
    'style'    => SOAP_RPC,
    'login'    => $soapUsername,
    'password' => $soapPassword,
));

$command = "account create " . $username . " " . $password . "";

$result = $client->executeCommand(new SoapParam($command, 'command'));
}
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
    </head>
    <body>
        <form action="" method="POST" autocomplete="off">
            <input type="password" style="display:none;">
            <input type="text" name="username" placeholder="username">
            <input type="password" name="password" placeholder="password">
            <input type="submit" name="submit" value="Submit" name="submit">
        </form>
    </body>
</html>

1 个答案:

答案 0 :(得分:0)

你没有在php.ini文件中启用soap打开它并搜索soap删除;在它面前。也接受它投掷服务器