Created
June 3, 2014 19:57
-
-
Save seagoj/cadaf05d352bcf4cf89e to your computer and use it in GitHub Desktop.
PHP:MSMQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define(MQ_SEND_ACCESS , 2); | |
define(MQ_DENY_NONE , 0); | |
$msgQueueInfo = new COM("MSMQ.MSMQQueueInfo") or die("can not create MSMQ Info object"); | |
$msgQueueInfo->PathName = ".\TestQueue"; | |
$msgQueue = new COM("MSMQ.MSMQQueue") or die("can not create MSMQ object"); | |
$msgQueue=$msgQueueInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE ); | |
$msgOut = new COM("MSMQ.MSMQMessage") or die("can not create MSMQ message object"); | |
$msgOut->Body = "Hello world!"; | |
$msgOut->Send($msgQueue); | |
$msgQueue->Close();; | |
unset($msgOut); | |
unset($msgQueue); | |
unset($msgQueueInfo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment