From The Blog

CakePHP: Get Client's IP Address

27 October 2012, in

in CakePHP 1.x

Through the RequestHandler Component:


in CakePHP 2.x

RequestHandler::getClientIp() is deprecated, so you can use the CakeRequest object



of course you can still use the server variable   $_SERVER['REMOTE_ADDR']

Post a Comment

PHP: client's IP address

27 October 2012, in

The IP Address of the client who sent HTTP request is stored in the server variable:


Post a Comment