Welcome Guest, Not a member yet? Register   Sign In
Capturing IP Address & Session in Log File
#1

(This post was last modified: 10-04-2023, 09:55 AM by mikestratton.)

I have created a custom handler that allows me to write logs to a database. Now I need to use that same logger to capture the user's IP address and Session related data in the database, as well. Suggestions, please?

To capture the IP Address:
$request = \Config\Services::request();
$request->getIPAddress(),

I was able to capture session data with: $_SESSION['username'],
$_SESSION['user_id'],
Reply


Messages In This Thread
Capturing IP Address & Session in Log File - by mikestratton - 10-04-2023, 09:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB