Reputation: 1566
I built a PHP script to help my team in work carry out a task more efficiently. It is not compulsory that they use it and they can still use the manual method. The script is located in a global location that is accessible for everyone to use, is it possible I can track usage by user so I can show the impact of the script? What would be the best way to do this?
I assume I could check who's logged into the script via command line and output the name and increment a counter once the script completes? Is there some better way?
Thanks
Upvotes: -3
Views: 58
Reputation: 98
If its on global location (ie public computer), there is no such simple way. There is no any if you ask me due to a many reasons (ie due to sharing informations mouth-to-mouth).
However, I have been using acces code(s) (simple phrase, or few digits number - per user) for me to know if some specific user has read some data/documents or not - online, on www. With no registration at all, from its own home!
Table should go like this:
id | name_of_mysterious_worker | email | access_code
Page at first loaded completly blank with input form to enter access form. When (and if) "mysterious" user entered his/her code, script launched (page opened), acces code went into DB and.. I expected that he/her read data or documents. I even knew exact time and location from where user accessed documents.
Note: user could not read/use anything without acces code if you follow me.
This is especially effective if some authcode is sent via url as email to workers. Ie http://ourcompany.com/index.php?email=workers_email&acces=ioa897u3u0120912
If you trust to your workers, you can add simple form field for them to simply enter their name during using script what would be easiest to program.
If that shall not be a case, some "usersystem" should be developed within script, at least one I just described.
Upvotes: 1