mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Update functions.php
This commit is contained in:
parent
1fa9691c04
commit
f5b05cc177
1 changed files with 5 additions and 1 deletions
|
@ -2218,10 +2218,14 @@ function infoByIP(string $ipAddress, int $port = 0): array
|
||||||
'continent' => $json['continent'],
|
'continent' => $json['continent'],
|
||||||
'continentCode' => $json['continentCode']
|
'continentCode' => $json['continentCode']
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($data)) {
|
||||||
|
$data = ['timestamp' => TIMENOW];
|
||||||
|
}
|
||||||
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
|
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue