Re: Log all GET AND POST?

From: Date: Thu, 15 Jul 2004 14:08:47 +0000
Subject: Re: Log all GET AND POST?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190594@lists.php.net to get a copy of this message
On Thursday 15 July 2004 09:58 am, Robert Sossomon wrote: > I was wondering if anyone knew of a way to log all GET and POST > information being passed to a log file? > > Thanks, > Robert $DEBUG_DATA = $_SERVER['PHP_SELF']."\n"; while (list ($key, $val) = each ($_REQUEST)) { if (is_array($_REQUEST[$key])){ while (list ($ar_key, $ar_val) = each ($_REQUEST[$key])) { $DEBUG_DATA .= "$key [ $ar_key ] => $ar_val\n"; } } else { $DEBUG_DATA .= "$key => $val\n"; } } mysql_select_db("HISTORY"); $query = "insert into BIG_BROTHER values ( '".$_SESSION['user_ID']."', ".time().", '$DEBUG_DATA')"; mysql_query($query); reset($_REQUEST);

« previous php.general (#190594) next »