PHP Code:
function onCreated() {
onTimeout(true);
}
function onTimeout(force_update) {
for (temp.a: allplayers) {
if (temp.a.level == NULL) temp.count_rc++;
else temp.count_players++;
}
if (this.last_rc != temp.count_rc || this.last_players != temp.count_players || force_update) {
requesturl("http://yourhost.com/api.php?rc=" @ temp.count_rc @ "&players=" @ temp.count_players);
this.last_rc = temp.count_rc;
this.last_players = temp.count_players;
}
setTimer(5);
}
some challenge huh?