PX : code

Simple Text Counter by Nooper
Download this code


<?php
    
//Simple PHP counter, v0.1. Send comments to junkmail@nooper.homeip.net
    
if (file_exists('count_file'))
    {
        
$fil fopen('count_file'r);
        
$dat fread($filfilesize('count_file'));
        echo 
$dat+1;
        
fclose($fil);
        
$fil fopen('count_file'w);
        
fwrite($fil$dat+1);
    }
    else
    {
        
$fil fopen('count_file'w);
        
fwrite($fil1);
        echo 
'1';
        
fclose($fil);
    }
php?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.