Menu Search

send.php

<?php



include("proton.php");

$mess = new Messenger();
$mess->start();

$msg = new Message();
if ($argv[1]) {
  $msg->address = $argv[1];
} else {
  $msg->address = "amqp://0.0.0.0";
}
$msg->subject = "Hello World!";
$msg->body = "this is a test";

$mess->put($msg);
$mess->send();
print "sent: $msg->subject\n";

$mess->stop();
?>

Download this file