()一个php telnet的有关问题

WBOY
Release: 2016-06-13 12:56:02
Original
865 people have browsed it

(在线等)求助一个php telnet的问题
前几天看了网上一个牛人写的php telnet的源码

<br>
<?php <br />
/**<br>
* name:薛如飞<br>
* qq:6706250<br>
* e-mail:xuerufei@163.com<br>
* blog:<a>http://hi.baidu.com/</a>飞云盖天<br>
* date:08.08.28<br>
**/<br>
if (isset($_POST['host']) and isset($_POST['user']))<br>
  {<br>
    $host= $_POST['host'];<br>
    $user= $_POST['user'];<br>
    $pass= $_POST['pass'];<br>
    $cmd= stripslashes($_POST['cmd']);<br>
require_once "phptelnet.php";<br>
$telnet = new PHPTelnet();<br>
$telnet->show_connect_error=0;<br>
$result = $telnet->Connect($host,$user,$pass);<br>
switch ($result)<br>
   {<br>
  case 0:<br>
  $telnet->DoCommand($cmd, $result);<br>
  echo $result;<br>
  $telnet->Disconnect();<br>
  break;<br>
  case 1:<br>
  echo '[PHP Telnet] Connect failed: Unable to open network connection';<br>
  break;<br>
  case 2:<br>
  echo '[PHP Telnet] Connect failed: Unknown host';<br>
  break;<br>
  case 3:<br>
  echo '[PHP Telnet] Connect failed: Login failed';<br>
  break;<br>
  case 4:<br>
  echo '[PHP Telnet] Connect failed: Your PHP version does not support PHP Telnet';<br>
  break;<br>
   }<br>
  }<br>
else<br>
  {<br>
?><br>
<meta><br>
Copy after login

   

   


   

Telnet


   
  
    
    
  
  
    
    
  
  
    
    
  
  
    
    
  
  
    
    
  
   
host:
user:
pass:
cmd:
          
 

   

 



   }
?>
 
/*
PHPTelnet 1.1
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template