note 31117 added to function.msg-receive

From: Date: Thu, 10 Apr 2003 08:56:17 +0000
Subject: note 31117 added to function.msg-receive
Groups: php.notes 
Request: Send a blank email to php-notes+get-46443@lists.php.net to get a copy of this message
This is meant to be run as your apache user in a terminal, call script in note of msg_send and they will communicate. #! /usr/bin/env php <?php $MSGKEY = 519051; // Message $msg_id = msg_get_queue ($MSGKEY, 0600); while (1) { if (msg_receive ($msg_id, 1, $msg_type, 16384, $msg, true, 0, $msg_error)) { if ($msg == 'Quit') break; echo "$msg\n"; } else { echo "Received $msg_error fetching message\n"; break; } } msg_remove_queue ($msg_id); ?> -- http://www.php.net/manual/en/function.msg-receive.php http://master.php.net/manage/user-notes.php?action=edit+31117 http://master.php.net/manage/user-notes.php?action=delete+31117 http://master.php.net/manage/user-notes.php?action=reject+31117

« previous php.notes (#46443) next »