function to get user IP address in Yii
In Yii2, use Yii::$app->getRequest()->getUserIP()
try this:
Yii::app()->request->getUserHostAddress()
instead
Yii::app()->request->getUserHostAddress
with "()" it should work
In Yii2, use Yii::$app->getRequest()->getUserIP()
try this:
Yii::app()->request->getUserHostAddress()
instead
Yii::app()->request->getUserHostAddress
with "()" it should work