hides line
Posted: Wed Oct 12, 2005 8:47 pm
How can i hide this line "newSwitch#terminal length 0" from printing out??
part of the Output
part of the Output
part of the source codePassword:
newSwitch>en
Password:
newSwitch#terminal length 0
newSwitch#show run
Building configuration...
Current configuration : 2027 bytes
!
version 12.1
Code: Select all
$fp = fsockopen ($host, $port, $errno, $errstr);
if (!$fp)
{
$results = "Error: could not open socket connection";
}
else
{
fgets ($fp, 1024);
fputs ($fp, $login_info[2]."\n");
fputs ($fp, "en\n");
fputs ($fp, $login_info[3]."\n");
fputs ($fp, "terminal length 0\n");
fputs ($fp, "sh vlan\n");
fputs ($fp, "\r");
while (true)
{
$tmpecho = fgets ($fp, 1024);
$moredetails .= $tmpecho;
fputs ($fp, "\r");
if (substr($tmpecho, 0, == '------- ')
{
break;
}
}
}
fclose($fp);