fix check current ip addres
This commit is contained in:
@@ -29,7 +29,7 @@ curl_close($ch);
|
|||||||
if ($serverIp) {
|
if ($serverIp) {
|
||||||
foreach ($toUpdateArray as $toUpdate) {
|
foreach ($toUpdateArray as $toUpdate) {
|
||||||
$toUpdate = trim($toUpdate);
|
$toUpdate = trim($toUpdate);
|
||||||
$currentIp = gethostbyname($toUpdate);
|
$currentIp = trim(shell_exec("dig +short @208.67.222.222 $toUpdate A | head -n1"));
|
||||||
if ($currentIp == $serverIp) {
|
if ($currentIp == $serverIp) {
|
||||||
echo "[$dateUpdate] $toUpdate: same (not update)" . PHP_EOL;
|
echo "[$dateUpdate] $toUpdate: same (not update)" . PHP_EOL;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user