Welcome Guest, Not a member yet? Register   Sign In
How to get ip?
#1

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

Libraries
?


CI - [font=Courier New][font=Courier New][b]protected $request;[/font][/b][/font]
Reply
#2

$_SERVER['REMOTE_ADDR'];
Reply
#3

(10-14-2017, 11:56 AM)Demort Wrote: Controllers 
$this->request->getIPAddress();

Libraries
?


CI - [font=Courier New][font=Courier New][b]protected $request;[/font][/b][/font]

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

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




Theme © iAndrew 2016 - Forum software by © MyBB