function aypi(){ if($this->input->ip_address() == ''){ $ip = $_SERVER['REMOTE_ADDR']; }else{ $ip = $this->input->ip_address(); } return $ip; }