ispconfig wrapper
1.0.0
ISPConfig3遠程API的簡單包裝器。
它旨在與ISPCONFIG 3互操作,旨在提供一個表現力而簡單的接口,以執行API提供的所有操作。
該庫充當ISPConfig 3 SOAP服務器和您的應用程序之間的代理。所有功能均被重命名為更具表現力(IMHO)的駱駝語法。它沒有進行任何驗證,只需將每個請求代理到相關的肥皂調用。唯一的更改是,每個響應都以JSON編碼數組的形式返回。
errors 。result包裹。$ composer require pemedina/ispconfig-wrapper 1. * 包裝器可以包含並在任何PHP應用程序上使用。
<?php
$ webService = new ISPConfigWS (
new SoapClient ( NULL ,
array ( ' location ' => ' http://192.168.0.55/remote/index.php ' ,
' uri ' => ' http://192.168.0.55/remote/ ' ,
' exceptions ' => 0 )
)
);
// Login
$ webService
-> with ( array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' ))
-> login ();
$ result = $ webService
-> with ( array ( ' client_id ' => 5 ))
-> getClient ()
-> response ();
print_r json_decode ( $ result ));
// Single call
$ result = $ webService
-> with ( array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' , ' password ' => ' newPass ' , ' client_id ' => 5 ))
-> changeClientPassword ()
-> response ();
print_r json_decode ( $ result )); <?php
$ webService = new ISPConfigWS (
new SoapClient ( NULL ,
array ( ' location ' => ' http://192.168.0.55/remote/index.php ' ,
' uri ' => ' http://192.168.0.55/remote/ ' ,
' exceptions ' => 0 )
)
);
$ loginDetails = array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' );
$ webService -> setParameters ( $ loginDetails );
$ webService -> login ();
. . .
. . .
$ parameters = array ( ' client_id ' => 5 );
$ webService -> setParameters ( $ parameters );
$ webService -> getClient ();
print_r json_decode ( $ webService -> getResponse () ));找到錯誤還是缺少功能?不要猶豫,在Github上創建一個新問題。