mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Simplified IPHelper (#712)
This commit is contained in:
parent
8a5bac558f
commit
d9d38935b6
11 changed files with 17 additions and 90 deletions
|
@ -20,7 +20,7 @@ $user = null;
|
|||
|
||||
// Obtain and encode user IP
|
||||
$client_ip = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
|
||||
$user_ip = \TorrentPier\Helpers\IPHelper::encodeIP($client_ip);
|
||||
$user_ip = \TorrentPier\Helpers\IPHelper::ip2long($client_ip);
|
||||
define('CLIENT_IP', $client_ip);
|
||||
define('USER_IP', $user_ip);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue