-3

I 'm creating a web app in which i need to save the sessions in the database including the Ip address of the user and the date and time of the session , for that i want to know how to do that ,knowing that the app will be used in LAN . i 'm using codeIgniter framework.

fodilleo
  • 3
  • 2
  • @fodilleo use codeigniter input class http://www.codeigniter.com/user_guide/libraries/input.html#CI_Input::ip_address –  Aug 21 '16 at 21:15

1 Answers1

4
echo $_SERVER['SERVER_ADDR']

or

echo $this->input->ip_address();
Eisa Adil
  • 1,743
  • 11
  • 16