Advertisement
krot

ISPConfig API

Feb 5th, 2019
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. $username = 'rmr';
  2. $password = 'pass';
  3. $soap_location = 'https://ip:8080/remote/index.php';
  4. $soap_uri = 'https://ip:8080/remote/';
  5. $client = new SoapClient(null, array('location' => $soap_location, 'uri'  => $soap_uri));
  6. try {
  7.     //* Login to the remote server
  8.     if($session_id = $client->login($username,$password)) {
  9.      echo 'Logged into remote server successfully. The SessionID is '.$session_id.'';
  10.     }
  11.        //* Logout
  12.      if($client->logout($session_id)) {
  13.        echo "FTP Created";
  14.      }
  15. } catch (SoapFault $e) {
  16.      die('SOAP Error: '.$e->getMessage());
  17.      echo "Please contact the server administator";
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement