#!/usr/bin/php <?php $commandprint = "Hello, this is some example text..."; While(!feof(STDIN)) { $line = rtrim(fgets(STDIN,1024)); $split = explode(" ",$line); if($split[0] == "INVALID_COMMAND") { if($split[1] == "/command") { if(isset($commandprint) && $commandprint != null) { echo "PLAYER_MESSAGE {$split[2]} \"{$commandprint}\"\n"; } } } } ?>