View Single Post
Old 07-14-2002, 09:39 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
hello,

first your url would look more like this when you pass variables with the get method:

http://www.mysite.com/somepage.php?username=mmilano

then you can make a script that reads something like this:

<?
// only run this code if $username exists
if($username)
{

// define the log file
$logfile=log_file_name.txt;

// check to see if the log file exists
if (file_exists($logfile)) {

// open file for append to end and write
$fp = fopen ("$logfile", "aw");

// write the params as name value pairs
fputs ("$username\n");

// close the file
fclose($fp);

}

}
?>

make sure the directory of the log file is set to "world write" or chmod 666

let us know how it went, .. good luck

btw. here is the a good link. php.net is your friend =)
http://www.php.net/manual/en/function.fwrite.php

Last edited by sde; 07-14-2002 at 09:42 AM.
sde is offline   Reply With Quote