1
我已經看到了一些關於如何使用SOAP API的文章,但似乎無法得到它的真實性,我只收到以下消息: SOAP錯誤:登錄失敗。用戶名或密碼錯誤ISPconfig上的SOAP API 3
我知道用戶/密碼的詳細信息是正確的,但我無法處理更具描述性的錯誤信息。
<?php
$username = 'admin';
$password = 'password';
$soap_location = 'https://test.uk:8080/remote/index.php';
$soap_uri = 'https://test.uk:8080/remote/';
$client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri));
try {
//* Login to the remote server
if($session_id = $client->login($username,$password)) {
echo 'Logged into remote server successfully. The SessionID is '.$session_id.'';
}
//* Logout
if($client->logout($session_id)) {
echo "FTP Created";
}
} catch (SoapFault $e) {
die('SOAP Error: '.$e->getMessage());
echo "Please contact the server administator";
}
?>