Advertisement
Guest User

Untitled

a guest
Feb 16th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'netconf/Device.php'; // connect method here is using fopen instead of expect_popen
  4.  
  5. $hostname = 'xxxx';
  6. $username = 'rod';
  7. $password = 'yyy';
  8. $port = '22';
  9.  
  10. $device = new Device($hostname, $username, $password, $port);
  11. $device->connect();
  12.  
  13. $reply = $device->execute_rpc("get-system-users-information");
  14. echo $reply->to_string();
  15. $device->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement