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,9 +2218,13 @@ function infoByIP(string $ipAddress, int $port = 0): array
|
|||
'continent' => $json['continent'],
|
||||
'continentCode' => $json['continentCode']
|
||||
];
|
||||
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($data)) {
|
||||
$data = ['timestamp' => TIMENOW];
|
||||
}
|
||||
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue