• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get ip?

#1
Controllers 
$this->request->getIPAddress();

Libraries
?


CI - [b]protected $request;[/b]
Reply

#2
$_SERVER['REMOTE_ADDR'];
Reply

#3
(10-14-2017, 12:56 PM)Demort Wrote: Controllers 
$this->request->getIPAddress();

Libraries
?


CI - [b]protected $request;[/b]

https://bcit-ci.github.io/CodeIgniter4/l...tIPAddress

PHP Code:
$request = \Config\Services::request();
echo 
$request->getIPAddress(); 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.