sites_ftp_user_get.php 688 B

123456789101112131415161718192021222324
  1. <?php
  2. //error_reporting(0);
  3. require('soap_config.php');
  4. $client = new SoapClient(null, array('location' => $soap_location,
  5. 'uri' => $soap_uri,
  6. 'trace' => 1,
  7. 'exceptions' => 1));
  8. $session_id = $client->login($username,$password);
  9. chdir('ftp_users');
  10. $username = $_GET['username'];
  11. $ftp_user_id = file_get_contents($username);
  12. $ftp_user_record = $client->sites_ftp_user_get($session_id, $ftp_user_id);
  13. if(isset($_GET['type']) AND $_GET['type'] == "detail")
  14. {
  15. foreach($ftp_user_record as $key => $value)
  16. {
  17. echo $key." : ".$value."\n";
  18. }
  19. }
  20. else
  21. {
  22. echo $ftp_user_record['username']."\t".$ftp_user_record['dir']."/./\n";
  23. }
  24. ?>