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上创建一个新问题。