fix ip info
This commit is contained in:
parent
8fe8d20c7d
commit
0461318d80
@ -29,13 +29,9 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = shell_exec('curl -s https://ifconfig.me');
|
$realIp = shell_exec('curl -s https://ifconfig.me');
|
||||||
|
|
||||||
$res = @json_decode($res, true);
|
|
||||||
|
|
||||||
if (!empty($res['ip'])) {
|
|
||||||
$realIp = $res['ip'];
|
|
||||||
|
|
||||||
|
if (!empty($realIp)) {
|
||||||
if ($realIp !== $recordIp) {
|
if ($realIp !== $recordIp) {
|
||||||
$msg = 'ip changed from ' . $recordIp . ' to ' . $realIp;
|
$msg = 'ip changed from ' . $recordIp . ' to ' . $realIp;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user