<?php

class network_info {
 
    public function get_client_ip() {
        if ( isset($_SERVER['CF-Connecting-IP']) ) {
            $ip = $_SERVER['CF-Connecting-IP'];
        }elseif ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }else {
            $ip = $_SERVER['REMOTE_ADDR'];
        }
        return $ip;
    }


}
