how would i do this
<?php
$filename= "hits.txt" ;
$fd = fopen ($filename , "r") or die ("Uhoh! The PHP script cant open $filename") ;
$fstring = fread ($fd , filesize ($filename)) ;
echo "$fstring" ;
fclose($fd) ;
$fd = fopen ($filename , "w") or die ("Uhoh! The PHP script cant open $filename") ;
$fcounted = $fstring + 1 ;
$fout= fwrite ($fd , $fcounted ) ;
fclose($fd) ;
?>
in perl ? this is one of the first times im using perl for a web scripting language, i've been using it for other cmd line things, so bear with me :classic2:
<?php
$filename= "hits.txt" ;
$fd = fopen ($filename , "r") or die ("Uhoh! The PHP script cant open $filename") ;
$fstring = fread ($fd , filesize ($filename)) ;
echo "$fstring" ;
fclose($fd) ;
$fd = fopen ($filename , "w") or die ("Uhoh! The PHP script cant open $filename") ;
$fcounted = $fstring + 1 ;
$fout= fwrite ($fd , $fcounted ) ;
fclose($fd) ;
?>
in perl ? this is one of the first times im using perl for a web scripting language, i've been using it for other cmd line things, so bear with me :classic2: