A page which logs the IP of the visitor and stores it to the database

arcaneex

Active member
A member , admin or a guest. Every person which visit a page should have his IP logged and stored. Is it possible to do it?
 

arcaneex

Active member
Okay I found the code to store/show the IP. But how do I make it work on the page and how to I make it store it on the database?
 

Jake Bunce

XenForo moderator
Staff member
XenForo already has a system for IP logging. Just use the XenForo_Model_Ip class (code example above).
 

Jake Bunce

XenForo moderator
Staff member
XenForo_Model_Ip logs the IP of the visitor. Just call that log() function as shown in the above code example. See this file for the class code:

library/XenForo/Model/Ip.php
 

arcaneex

Active member
I really don't understand what this means : ($user['user_id'], 'user', $user['user_id'], 'register'); can you please explain?
 
Top