diff --git a/project/updateip.php b/project/updateip.php index 02a735f..bc30ae9 100644 --- a/project/updateip.php +++ b/project/updateip.php @@ -29,7 +29,7 @@ curl_close($ch); if ($serverIp) { foreach ($toUpdateArray as $toUpdate) { $toUpdate = trim($toUpdate); - $currentIp = gethostbyname($toUpdate); + $currentIp = trim(shell_exec("dig +short @208.67.222.222 $toUpdate A | head -n1")); if ($currentIp == $serverIp) { echo "[$dateUpdate] $toUpdate: same (not update)" . PHP_EOL; continue;