This commit is contained in:
icret
2022-02-02 03:28:06 +08:00
parent 2eee083a66
commit c2c6eb3a12
8 changed files with 194 additions and 127 deletions

View File

@@ -582,7 +582,6 @@ function deldir($dir)
}
}
/**
* 图片监黄curl 访问网站并返回解码过的json信息
* @param $img string 图片url
@@ -745,7 +744,6 @@ function re_checkImg($name)
}
}
/**
* 创建缩略图
* @param $imgName string 需要创建缩略图的名称
@@ -1049,3 +1047,21 @@ function checkIP($ipNow = null, $ipList = null, $model = false)
return true;
}
}
/**
* 测试IP或者url是否可以ping通
* @param $host string ip或网址
* @param $port int 端口
* @param $timeout float 过期时间
* @return bool true|false
*/
function IP_URL_Ping($host, $port, $timeout)
{
$errno = 444;
$errstr = 'fSockOpen 错误';
$fP = fSockOpen($host, $port, $errno, $errstr, $timeout);
if (!$fP) {
return false;
}
return true;
}