is there a counter for WP

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Colmike7
Banned
Banned
Posts: 1670
Joined: May 23rd, 2018, 12:21 pm
Title: (>^-^)b

#31

Post by Colmike7 » August 10th, 2020, 11:24 pm

If anyone wants a simple one:

save this as count.php:

Code: Select all

$handle = fopen("count.txt", "r");  //r means read only
if(!$handle) { echo "could not open the file"; } 
  else { 
    $counter =(int )fread($handle,20);
        fclose($handle); 
        $counter++; 
        echo"There are ". $counter . " visits so far" ; 
    $handle = fopen("count.txt", "w" );   //w means writing only
    
    fwrite($handle,$counter);
    fclose ($handle); 
}
then create a count.txt, save in the same directory or modify the code.
Then, you know, <?php include "count.php"; ?> if you want to show it on the page.


Some people will get all mad because this is using a plain text file for the log instead of using a DB, but it's simple and it works. :p




rx_tom
Verified Member
Verified Member
Posts: 811
Joined: January 11th, 2019, 11:27 am
Referrals: 4

#32

Post by rx_tom » August 11th, 2020, 7:45 pm

Just want to test it out, thank you for the code colmike7.




User avatar
BHT
Verified Member
Verified Member
Posts: 1458
Joined: March 30th, 2018, 3:28 pm

#33

Post by BHT » August 14th, 2020, 3:54 pm

you are wasting time and eve potentially slowing down your web page with an offsite counter for no practical reason.




Colmike7
Banned
Banned
Posts: 1670
Joined: May 23rd, 2018, 12:21 pm
Title: (>^-^)b

#34

Post by Colmike7 » August 15th, 2020, 1:58 pm

BHT wrote: ↑
August 14th, 2020, 3:54 pm
you are wasting time and eve potentially slowing down your web page with an offsite counter for no practical reason.
Those counters that slowed down sites were those iframes that aren't really around anymore. If you want to track visits in a basic way like above, that won't slow anything down.

I still mostly just use GA, though.




voyeurz
Verified Member
Verified Member
Posts: 676
Joined: January 26th, 2019, 11:39 am

#35

Post by voyeurz » August 24th, 2020, 11:25 am

Colmike7 wrote: ↑
June 30th, 2020, 11:41 am
Just use Google Analytics
You cna now close this thread




Ricks-Cams
Verified Member
Verified Member
Posts: 1089
Joined: March 13th, 2018, 1:17 pm

#36

Post by Ricks-Cams » August 27th, 2020, 10:23 am

It really is pointless having counters on sites.
You want to make money work the cams

Sammy
Verified Member
Verified Member
Posts: 331
Joined: July 6th, 2018, 8:57 am

#37

Post by Sammy » August 30th, 2020, 1:22 pm

AWStats is good but not for public view




Cumslut
Verified Member
Verified Member
Posts: 462
Joined: October 24th, 2018, 5:59 am

#38

Post by Cumslut » September 1st, 2020, 9:36 am

Sammy wrote: ↑
August 30th, 2020, 1:22 pm
AWStats is good but not for public view
I have it in my Cpanel




bucksm
Verified Member
Verified Member
Posts: 780
Joined: February 19th, 2018, 7:23 pm

#39

Post by bucksm » September 3rd, 2020, 9:17 pm

The winning answer is no counter is good




jlinkz
Verified Member
Verified Member
Posts: 799
Joined: March 30th, 2018, 8:30 pm

#40

Post by jlinkz » September 15th, 2020, 11:21 am

Show me one blog which uses a counter.




User avatar
TheButcher
Administrator
Administrator
Posts: 17530
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#41

Post by TheButcher » September 17th, 2020, 10:52 am

jlinkz wrote: ↑
September 15th, 2020, 11:21 am
Show me one blog which uses a counter.
Can not think of any or I would

is there a counter for WP

Post Reply