[英]fsockopen PHP check open port for RDP not working
Its not checking Port for RDP = 3389 , for ftp yes , web yes , telnet yes can anyone tell me why its not working just for RDP port 3389 它不检查RDP的端口= 3389,对于ftp是,Web是,telnet是谁能告诉我为什么它不能仅用于RDP端口3389
if($type == "rdp") {
$sql = mysql_query("select * from stuff where stuff_id = '$id'");
$rows = mysql_fetch_assoc($sql);
$server = trim($rows['addinfo']);
$host = "RDP IP";
$port = "3389";
$timeout = 2;
$tbegin = microtime(true);
$fp = fsockopen($host, $port, $errno, $errstr, $timeout);
$responding = 1;
if (!$fp) { $responding = 0; }
$tend = microtime(true);
fclose($fp);
$mstime = ($tend - $tbegin) * 1000;
$mstime = round($mstime, 2);
if($responding)
{
echo "<a href='#' class='btn btn-success'>Connected</a>";
}
else
{
echo "<a href='#' class='btn btn-danger'>Checker Fail !</a>";
}
似乎脚本正在尝试连接到“ RDP IP”,而不是使用服务器变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.