Does this snippet work? Yes. Should it be used? Depends. Maybe if you run it at large intervals, caching the results for the time in between. I hardly doubt you need real-time verification of where you stand in the XP world. It takes N+1 hits to the site to get the data (where N=number of users logged in). Hitting the site 41 times when 40 users are logged in is not playing nice. Perhaps throwing in a 'sleep 4' in the foreach() loop would help.
Another thread in Perl Monks Discussion very recently discussed why the site is being sluggish. The last thing we need is 20 people hitting the site 30 times every 20 seconds.
In reply to Re^2: XP Barometer
by Coruscate
in thread XP Barometer
by MZSanford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |