Index: /trunk/FACT++/www/smartfact/index.js
===================================================================
--- /trunk/FACT++/www/smartfact/index.js	(revision 14120)
+++ /trunk/FACT++/www/smartfact/index.js	(revision 14121)
@@ -29,5 +29,20 @@
 function onload()
 {
-    try { var dummy = new XMLHttpRequest(); }
+    try
+    {
+        var xmlLoad = new XMLHttpRequest();
+        xmlLoad.open('POST', "index.php?load", true);
+        xmlLoad.onload = function()
+        {
+            if (xmlLoad.status!=200)
+            {
+                //alert("ERROR[0] - HTTP request '"+xmlLoad.statusText+" ["+xmlLoad.status+"]");
+                return;
+            }
+            if (xmlLoad.responseText.length>0)
+                alert(xmlLoad.responseText);
+        };
+        xmlLoad.send(null);
+    }
     catch(e)
     {
Index: /trunk/FACT++/www/smartfact/index.php
===================================================================
--- /trunk/FACT++/www/smartfact/index.php	(revision 14120)
+++ /trunk/FACT++/www/smartfact/index.php	(revision 14121)
@@ -61,4 +61,24 @@
 }
 // --------------------------------------------------------------------
+
+if (isset($_GET['load']))
+{
+    $d = date("Y/m");
+
+    $path = "log/".$d;
+
+    if (!file_exists($path))
+        mkdir($path, 0777, true);
+
+    $addr = isset($_SERVER['REMOTE_ADDR'])   ? $_SERVER['REMOTE_ADDR']   : "-";
+    $user = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : "-";
+    $dns  = gethostbyaddr($addr);
+
+    $file = fopen($path."/smartfact.log", "a");
+    fwrite($file, date("Y/m/d H:i:s ").$addr." ".$dns." ".$user."\n");
+    fclose($file);
+
+    return;
+}
 
 if (isset($_GET['logout']))
