Difference between revisions of "Nats4 Member Logging"

From TMM Wiki
Jump to navigationJump to search
Line 26: Line 26:
  
 
== Extra Features ==
 
== Extra Features ==
To add more than one site, use the siteids parameter:
+
To add more than one site, use the siteid parameter:
  
 
<pre>
 
<pre>
$url="http://www.server.com/member_loginlog.php?username=$_SERVER[REMOTE_USER]&siteids=5,64,2&ip=$_SERVER[REMOTE_ADDR]";
+
$url="http://www.server.com/member_loginlog.php?username=$_SERVER[REMOTE_USER]&siteid=5,64,2&ip=$_SERVER[REMOTE_ADDR]";
 
</pre>
 
</pre>
  
 
[[Category:Also NATS4 Article]]
 
[[Category:Also NATS4 Article]]

Revision as of 19:22, 7 June 2010

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers

You can tell NATS to keep a log of member logins. Send a HTTP GET request from your server to the PHP script, member_loginlog.php with the site's ID number and the member's username. For example, you can add the following code to a PHP script and then run the script:

$url="http://www.example.com/member_loginlog.php?username=$_SERVER[REMOTE_USER]&siteid=123&ip=$_SERVER[REMOTE_ADDR]";

@file($url);

To access this secure feature, the IP address of the server making the request must be in the following $config['SECURE_IPS'] configuration file setting. For example,

$config['SECURE_IPS'] = Array('123.123.123.123');

Replace 123.123.123.123 with your server's IP address.

After activating this feature, the member's logins show up in the Members Admin's members details.

Extra Features

To add more than one site, use the siteid parameter:

$url="http://www.server.com/member_loginlog.php?username=$_SERVER[REMOTE_USER]&siteid=5,64,2&ip=$_SERVER[REMOTE_ADDR]";