Advertisement
Guest User

Untitled

a guest
Nov 25th, 2010
1,242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. require_once "bras_config.php";
  3. require_once "PHPTelnet.php";
  4.  
  5. set_time_limit ( 180);
  6.  
  7. $telnet = new PHPTelnet();
  8. //$telnet->show_connect_error=1;
  9. //$telnet->use_usleep=1;
  10.  
  11. // if the first argument to Connect is blank,
  12. // PHPTelnet will connect to the local host via 127.0.0.1
  13. $result = $telnet->Connect(BRAS_HOST,BRAS_ADMIN,BRAS_PASS);
  14.  
  15.  
  16. dmp("Telnet connect returns: $result");echo '<hr/>';
  17. if ($result ==0) {
  18.     $telnet->DoCommand('enable', $result);
  19.     dmp($result);
  20.     sleep(1);
  21.     $telnet->DoCommand('show subscribers username user@isp', $result);
  22.     dmp($result);
  23. }
  24.  
  25. $telnet->Disconnect();
  26. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement