Yii Framework Forum: How to get user's IP address? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to get user's IP address? Rate Topic: -----

#1 User is offline   JFReyes 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 477
  • Joined: 28-October 09
  • Location:Puerto Rico

Posted 10 April 2010 - 06:03 AM

Hi:

I want to store the user's IP address upon logging in. How do I do that?

Moreover, I don't want this to affect the update_time attribute automatically updated by CTimeStampBehavior, as I want that to track *other* changes to the user's record.

Thanks for the help.
José
0

#2 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 12 April 2010 - 07:47 AM

You can get the user IP Address by calling userHostAddress http://www.yiiframew...tAddress-detail
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users