diff --git a/jobs/ddns.php b/jobs/ddns.php index 19ab8b2..387c400 100644 --- a/jobs/ddns.php +++ b/jobs/ddns.php @@ -29,13 +29,9 @@ try { } -$res = shell_exec('curl -s https://ifconfig.me'); - -$res = @json_decode($res, true); - -if (!empty($res['ip'])) { - $realIp = $res['ip']; +$realIp = shell_exec('curl -s https://ifconfig.me'); +if (!empty($realIp)) { if ($realIp !== $recordIp) { $msg = 'ip changed from ' . $recordIp . ' to ' . $realIp;