[wplug] Web logging?
Russ Schneider
russ at sugapablo.com
Fri Nov 4 14:25:31 EST 2005
On Fri, 4 Nov 2005, Zach wrote:
> As I said I only have regular user priveleges on the web server. Thus I
> do not have access to the log files.
Ah, I understand now. Sorry, I sent you a script that needed access to
the logs (at least to read).
If you want a script to grab and store stuff as it comes in, in PHP this
could be done pretty simply.
Just loop through the pre-defined $_SERVER variables and add a date
function like this:
<?php
echo "<table border=\"1\">";
echo "<tr><td>Date/Time</td><td>".date('Y-m-d H:i:s')."</td></tr>";
foreach($_SERVER as $key=>$value) {
echo "<tr><td>".$key."</td><td>".$value."</td></tr>";
}
echo "</table>";
?>
This will just echo it out to the screen. But you can include a modified
version of this in any webpage you'd like (using include("filename.php");)
to track and save the data to a database or file.
--
[=============================================================================]
Russ Schneider (a.k.a. Sugapablo) -> http://www.sugapablo.net
[=============================================================================]
More information about the wplug
mailing list