Hi all! I am trying to build a Visitor_Log.txt file for my page, which will write specific information about users that visit the page (time of day they visited, browser they are using, operating system, etc) to a txt file on my server.
My question is... how do I write these values to the file as soon as they access the page? I'm very comfortable with using JavaScript to get user information, but I know that PHP also has built-in functions to get user information as well... would I do something along the lines of... <? $TheFile = "log.txt"; $Open = fopen($TheFile, "a"); if($Open) { fwrite($Open, "$HTTP_USER_AGENT\n"); fclose($Open); } ?> If someone loaded a page with that in it, would it write to the file as soon as it's accessed and interpreted, or would some action have to take place to make it run? I won't ask which PHP Variables can be used to get user information, I can find that information in the Manual... any information as to my questions would be wonderful! Also, please CC me on responses since I'm on the digest! Thank you in advance! Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php