|
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.
|