You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Hiram Chirino <hi...@hiramchirino.com> on 2006/03/19 19:12:33 UTC

New STOMP PHP client

Hi Everybody,

I just finished putting together a simple STOMP PHP client.  So if
your LAMP kinda guy, you should now be able to use ActiveMQ if you
have some messaging requirements.

I committed the client into the ActiveMQ tree since the STOMP svn repo
seemed to be down at the time I was trying to commit.  If it comes
back up, this may move over to that repo.  But for now, you can get it
at:

https://svn.apache.org/repos/asf/incubator/activemq/trunk/stomp/php

here's a little example of it in use:

<?php

require_once 'Stomp.php';

$c = new StompConnection("localhost");
$result = $c->connect("hiram", "test");
print_r($result);

$c->subscribe("/queue/FOO");
$c->send("/queue/FOO", "Hello World!");

// Wait for the message to come in..
$result = $c->readFrame();
print_r($result);

$c->disconnect();

?>


--
Regards,
Hiram

Re: New STOMP PHP client

Posted by James Strachan <ja...@gmail.com>.
Awesome! :)

Thats the main scripting languages all sorted now; ruby, python, php
and perl. Yay!

James

On 3/19/06, Hiram Chirino <hi...@hiramchirino.com> wrote:
> Hi Everybody,
>
> I just finished putting together a simple STOMP PHP client.  So if
> your LAMP kinda guy, you should now be able to use ActiveMQ if you
> have some messaging requirements.
>
> I committed the client into the ActiveMQ tree since the STOMP svn repo
> seemed to be down at the time I was trying to commit.  If it comes
> back up, this may move over to that repo.  But for now, you can get it
> at:
>
> https://svn.apache.org/repos/asf/incubator/activemq/trunk/stomp/php
>
> here's a little example of it in use:
>
> <?php
>
> require_once 'Stomp.php';
>
> $c = new StompConnection("localhost");
> $result = $c->connect("hiram", "test");
> print_r($result);
>
> $c->subscribe("/queue/FOO");
> $c->send("/queue/FOO", "Hello World!");
>
> // Wait for the message to come in..
> $result = $c->readFrame();
> print_r($result);
>
> $c->disconnect();
>
> ?>
>
>
> --
> Regards,
> Hiram
>


--

James
-------
http://radio.weblogs.com/0112098/