WhatPulse_Example.php
Revision: HEAD - (Download) (As Text)
| 0. | <? |
| 1. | require('WhatPulse.class.php'); |
| 2. | $wp = new WhatPulse($_GET['uid']); |
| 3. | $stats = $wp->readUserStats(); |
| 4. | |
| 5. | $name = $stats["AccountName"]; |
| 6. | $tks = $stats["TotalKeyCount"]; |
| 7. | $tmc = $stats["TotalKeyCount"]; |
| 8. | $days = round((time()-strtotime($stats["DateJoined"]))/86400); |
| 9. | echo "$name has $tks and $tmc in $days days making <b>".round($tks/$days)."</b> keystrokes and <b>".round($tmc/$days)."</b> clicks everyday.<br />"; |
| 10. | ?> |