gpt4 book ai didi

php - fsockopen PHP检查RDP的打开端口不起作用

转载 作者:行者123 更新时间:2023-11-29 19:24:46 25 4
gpt4 key购买 nike

它不检查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”,而不是使用服务器变量。

关于php - fsockopen PHP检查RDP的打开端口不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42227922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com