Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- $host = '10.23.45.1';
- $port = '23';
- $user = 'edp';
- $pass = '123';
- $socket = fsockopen($host, $port) or die('Could not connect to: '.$host);
- $userdota = "palma";
- if($socket)
- {
- sendcmd($user." rn",$socket);
- sendcmd($pass." rn",$socket);
- sendcmd("tool bandwidth-test 10.23.35.41 protocol=tcp direction=both user=adminstrator pass=intel rn",$socket);
- $line=fgets($socket);
- echo $line;
- }
- function sendcmd($cmd,$socket) // send command function
- {
- fputs($socket, $cmd, strlen($cmd));
- }
- ?>
- status: running
- duration: 6s
- tx-current: 509.6kbps tx-10-second-average: 277.9kbps
- tx-total-average: 277.9kbps
- rx-current: 971.2kbps rx-10-second-average: 566.7kbps
- rx-total-average: 566.7kbps
- random-data: no
- direction: both
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement