How to get the IP of the Visitor in CakePHP


To get the IP address of the visitor if you are using CakePHP
click here

Another way to get more info
All $_SERVER vars can be accessed using env(‘VAR_NAME’) in CakePHP

Advertisements

2 Responses to “How to get the IP of the Visitor in CakePHP”

  1. $this->RequestHandler->getClientIp();

  2. cake 2 : CakeRequest::clientIp()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: