fix check current ip addres
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user