[wplug] PHP help

Tom Rhodes trhodes at FreeBSD.org
Wed Jan 4 19:37:52 EST 2006


On Wed, 4 Jan 2006 18:19:05 -0500
Zach <netrek at gmail.com> wrote:

> I would like the following script to save stats to a file called
> "stats.txt" in the CWD (Linux).
> Anyone know how modify the code to do this:

By using the fopen() function call.  I can't remember,
it's been so long since I touched PHP.  Something like:

fopen(stats.txt, "w")

Or some crap.  It's not much, but perhaps a starting point?

> 
> <?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>";
> ?>

-- 
Tom Rhodes


More information about the wplug mailing list