[Openfirst-cvscommit] logger logger.php,1.7,1.8
Brought to you by:
xtimg
From: <xt...@us...> - 2003-12-22 22:13:22
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv23480 Modified Files: logger.php Log Message: Fix issues encountered when using programs which operate directly, rather than through a web server. This fix also marks user agents which do not identify themselves as being unknown. Index: logger.php =================================================================== RCS file: /cvsroot/openfirst/logger/logger.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** logger.php 30 Sep 2003 23:45:29 -0000 1.7 --- logger.php 22 Dec 2003 22:13:19 -0000 1.8 *************** *** 27,35 **** */ ! $IP = $_SERVER['REMOTE_ADDR']; $HOST = gethostbyaddr($IP); $DATE = date("F j, Y, g:i a"); $SCRIPT = $_SERVER['PHP_SELF']; ! $BROWSER = $_SERVER['HTTP_USER_AGENT']; if (ISSET($_SERVER['QUERY_STRING'])){ --- 27,55 ---- */ ! /* ! * If there isn't a remote address set, then this script is ! * being called from the shell, rather than through a web server ! * and therefore is operating on the local host. ! */ ! if(isset($_SERVER['REMOTE_ADDR'])) { ! $IP = $_SERVER['REMOTE_ADDR']; ! } else { ! $IP = "127.0.0.1"; ! } $HOST = gethostbyaddr($IP); $DATE = date("F j, Y, g:i a"); $SCRIPT = $_SERVER['PHP_SELF']; ! ! /* ! * If there isn't a user agent set, then this script is perhaps ! * being called from the shell, or by a browser which does not ! * identify itself. ! */ ! ! if(isset($_SERVER['HTTP_USER_AGENT'])) { ! $BROWSER = $_SERVER['HTTP_USER_AGENT']; ! } else { ! $BROWSER = "Unknown"; ! } if (ISSET($_SERVER['QUERY_STRING'])){ |