<?php
  $datearray = getdate();
  $year = $datearray["year"];
  $month = $datearray["mon"];
  $day = $datearray["mday"];
  $hour = $datearray["hours"];
  $minute = $datearray["minutes"];
  $filename = "log/access.log";
  $fl=fopen($filename,'a');
  fwrite ($fl, "[$_SERVER[REMOTE_ADDR] on $day-$month-$year at $hour:$minute userid:$_POST[sn_username]]\n");
  fclose($fl);
?> 
