mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Update
This commit is contained in:
parent
fb70c2730d
commit
6fa6cf7dbf
3 changed files with 27 additions and 2 deletions
|
@ -320,6 +320,22 @@ function zipDirectory($source, $destination)
|
|||
return file_exists($destinationOriginal);
|
||||
}
|
||||
|
||||
function isPortOpenInternal($host, $port) {
|
||||
$output = [];
|
||||
$result = null;
|
||||
exec("nc -zv {$host} {$port} 2>&1", $output, $result);
|
||||
foreach ($output as $line) {
|
||||
_log($line);
|
||||
}
|
||||
return $result === 0;
|
||||
}
|
||||
|
||||
function isPortOpenExternal($port) {
|
||||
$ports = array($port);
|
||||
//postVariables($url, $array, $httpcodeOnly = true, $timeout = 10)
|
||||
$response = postVariables('https://search.ypt.me/checkPorts.json.php', $ports, false, 4);
|
||||
return $response;
|
||||
}
|
||||
|
||||
function getPIDUsingPort($port)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue