NukeViet\Core\Ips::nv_getip PHP Method

nv_getip() private method

ips::nv_getip()
private nv_getip ( )
    private function nv_getip()
    {
        if ($this->client_ip != 'none') {
            return $this->client_ip;
        }
        if ($this->forward_ip != 'none') {
            return $this->forward_ip;
        }
        if ($this->remote_addr != 'none') {
            return $this->remote_addr;
        }
        if ($_SERVER['SERVER_NAME'] == 'localhost') {
            return '127.0.0.1';
        }
        return 'none';
    }