Mobile app version of vmapp.org
Login or Join
Margaret670

: Where can I find a good PhP counter? I want it to be free. Unseen by user. It must be PHP. If the counter need to curl another website I prefer that it's done on background so not to

@Margaret670

Posted in: #Statcounter

I want it to be free. Unseen by user. It must be PHP. If the counter need to curl another website I prefer that it's done on background so not to slow down my site.

Any such things? I think I used to see counters, but those are mostly javascripts.

Note:

I don't want to create my own. I want something that's third party.
Also I want php rather than javascript counter.

I tried googling and can't find one I am looking for. Try googling and everyone will teach you how to build one rather than giving one available.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Margaret670

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

If you want a simple hit counter:

function countAndShowHits(){
mysqli_query("UPDATE site_hits SET hits=hits+1 WHERE id=1");
$stats = mysqli_query("SELECT hits FROM site_hits WHERE id=1")->fetch_assoc();
return $stats['hits'].' hits';
}

// every time you call it like this, hits will +1:
echo countAndShowHits();

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme