|
Posted by Krustov on 06/06/07 00:45
<comp.lang.php>
<>
<Mon, 04 Jun 2007 15:00:44 -0700>
<1180994444.859624.28970@p47g2000hsd.googlegroups.com>
> Spent a hour googling for a free PHP counter but all I can find are
> ones you pay for
>
> Any ideas ?
>
$filename="counter/home.php";
$filename="counter/contact.php";
$filename="counter/faq.php";
etc etc
<?php
$skunk=$_SERVER['REMOTE_ADDR']; $rambo=str_replace(".","_",$skunk);
$filename="counter/poop.php";
$fp=fopen($filename,"r");
$qaz=fgets($fp); $temp=trim($qaz);
$qaz=fgets($fp); $hippy=trim($qaz);
fclose($fp);
if ($rambo<>$hippy)
{
$temp=$temp+1;
$fp=fopen($filename,"w");
fwrite ($fp,$temp); fwrite ($fp,"\n");
fwrite ($fp,$rambo); fwrite ($fp,"\n");
fclose($fp);
}
?>
<div align="center" class="gap9"> </div>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><?php print $temp; ?></td>
</tr>
</table>
<br><br>
</BODY>
</HTML>
Navigation:
[Reply to this message]
|