I'm developing a reusable PHP hit counter. Is the following the correct way
to accomplish this function?
This HTML module is in one directory ...
<html>
<body>
You are the
<? ../cgi-bin/counter.php?$App="xxx"?$Trailer="X"; ?>
visitor.
</body>
</html>
All the above does is calls counter.php with the application's name and
whether a trailer is desired. It is supposed to
return "1st", "2nd", "3rd", "4th" ..... etc. to be displayed within the
"You are ...." string.
This PHP module resides in cgi-bin ...
<?
// I am counter.php
do the file I/O stuff using $App and $Trailer
return $theresult
?>
All the above does is reads the application's hit counter file (creates one
if not found) and sends the text back to the
calling HTML module.