View Single Post
Old 03-27-2015, 01:08 PM  
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
It would just give you the count (printed to a file) when you run it and would not output 'print or echo' the count on your site.

PHP could open the counter file and echo that count.

What I wrote is the basis of a .sh (bash script) that could be set into a cron job -- the server would do it every 4 hours or something. This is the fast way to do things with the least server resources used.

If you were to add a PHP script to do this each time the wordpress page loads it is a waste of resources ... polling the same count over and over each page load slows the page load time ...

The count should be cached every so often 1 sec - 1 day this is done in a user crontab.
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote