How to get Ip Address in Codeigniter?

By Hardik Savani | June 13, 2016 | | 29976 Viewer | Category : Codeigniter


If you are work on Codeigniter application and you require to get client ip address then you can get easy. you don't need to use $_SERVER variable like native PHP, but Codeigniter provide $this->input. you can fetch easy using following example:

Example:

$ip = $this->input->ip_address();

print_r($ip);




***Do you want me hire for your Project Work? Then Contact US.


We are Recommending you: