mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
fix ip
This commit is contained in:
parent
54915dc87a
commit
6ce3fa2f45
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ $gen_simple_header = false;
|
|||
$user = null;
|
||||
|
||||
// Obtain and encode user IP
|
||||
$client_ip = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
|
||||
$client_ip = (filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
|
||||
$user_ip = encode_ip($client_ip);
|
||||
define('CLIENT_IP', $client_ip);
|
||||
define('USER_IP', $user_ip);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue