<? require('slock.inc'); function basketBallPlayer() { print("\nI've got the ball!\n"); for($i = 0; $i < 3; $i ++) { print(" I'm dribbling it ...\n"); sleep(1); } print("Now I pass it to someone else ...\n"); } for($i = 0; $i < 5; $i ++) { if(!SLock::doCall("basketBallPlayer", 8787, $errMsg)) die($errMsg . "\n"); sleep(2 + (rand() % 3)); } ?>