mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
misc: Minor improvements (#1898)
* misc: Minor improvements * Update functions.php * Update functions.php
This commit is contained in:
parent
513e3065d3
commit
2f026921ee
2 changed files with 9 additions and 2 deletions
|
@ -2218,9 +2218,16 @@ 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 = [
|
||||
'response' => false,
|
||||
'timestamp' => TIMENOW
|
||||
];
|
||||
}
|
||||
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue