PHPBuilder - Basic Logging / counter

RSS Twitter
Snippets Databases

Basic Logging / counter

by: Joost
December 12, 2002

Version: 2.2b

Type: Sample Code (HOWTO)

Category: Databases

License: GNU General Public License

Description: This is a basic logging counter program I have been using. I appreciate any and all comment on my code as I am relatively new to php and imagine there is always a better way to do something. Thanks for any tips.

<? /* Counter Code . Created by Joost van Wollingen 2002 */

        /* Edit to match your html code */

      	echo "<BR><BR><font size=2><center>You are visitor :<BR>$visitor";

        /* Don't edit this */            
       	$file = fopen("counter.php","w+");
	$data = "<?php \$visitor = \"" . $visitor . "\";";
	$data .= "?>";
	fputs($file, $data);

Comment and Contribute

Your comment has been submitted and is pending approval.




(Maximum characters: 1200). You have characters left.