<?php include __DIR__."/../lib/sysVcom.php"; //create the comms file touch('BU-commander'); //remove all queues at startup clear_IPC( '../svc/BU-commander' ); rpc_setGlobals( 'procName', '../svc/BU-commander' ); rpc_setGlobals( 'max_chan', 8182 ); $msgArr = null; while(true){ $caller_id = 0; $obj = rpc_listen( $caller_id, $msgArr ); //print_r( $obj ); //do something with the data array_unshift( $obj, "Greetings" ); //send msg back rpc_reply( $caller_id, $obj ); //done with the message unset( $msgArr[$caller_id] ); } ?>