Thank you very much for this code.
--------------- Added [DATE]1353004307[/DATE] at [TIME]1353004307[/TIME] ---------------
Same thing with timestamps added,
Code:
if ($vbulletin->userinfo['userid'] AND $vbulletin->session->created)
{
$fp = @fopen('memberips.log', 'a'); // <--- add path to writable directory
if (!empty($fp))
{
fwrite($fp, vbdate($vbulletin->options['dateformat'] . ',' . $vbulletin->options['timeformat']) . ',' . $vbulletin->userinfo['userid'] . ',' . $vbulletin->db->escape_string($vbulletin->userinfo['username']) . ',' . IPADDRESS . "\n");
}
}