<?php include "sysVcom.php"; //clear the queues at startup - otherwise things can get tricky clear_IPC( ); $msgArr = null; while(true){ //get msg $caller_id = IPC_listen( $msgArr ); //send msg back IPC_reply( $caller_id, $msgArr[$caller_id]['msg'] ); //done with the message unset( $msgArr[$caller_id] ); } ?>