function DoCommand($c,&$r) {
if ($this->fp) {
fputs($this->fp,"$c\r");
$this->Sleep();
$this->GetResponse($r);
$bad_char = "/\r/";
//$r=preg_replace("$bad_char","<br>\n",$r);
$r=ereg_replace("[^A-Za-z0-9<>._@ ]", "", $r);
}
//#return $this->fp?1:0;
return $r;
}
function GetResponse(&$r) {
$r='';
do {
$r.=fread($this->fp,1000);
$s=socket_get_status($this->fp);
} while ($s['unread_bytes']);
}
raw output is....
show ver �[K Redback Networks SmartEdge OS Version SEOS-4.0.7.2p4-Release Built by sysbuild@@lx-lsf237Thu Mar 8 11:48:02 PST 2007 Copyright (C) 1998-2007, Redback Networks Inc. All rights reserved. System Bootstrap version is PowerPC,1.0b1271 Installed minikernel version is 22 Router Up Time - 4 days, 22 hours 48 minutes 56 secs �[K[local]velse1#exit �[K �[KBack