mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Added IPHelper implementation (#631)
This commit is contained in:
parent
2ac13bbc50
commit
ef4e1aa18f
11 changed files with 152 additions and 60 deletions
|
@ -28,7 +28,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 = encode_ip($client_ip);
|
||||
$user_ip = \TorrentPier\Helpers\IPHelper::encodeIP($client_ip);
|
||||
define('CLIENT_IP', $client_ip);
|
||||
define('USER_IP', $user_ip);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue