PHPackages                             iron-io/iron\_mq - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. iron-io/iron\_mq

ActiveLibrary

iron-io/iron\_mq
================

Client binding for IronMQ (hosted message queue)

4.0.1(10y ago)871.8M↑15.5%42[12 issues](https://github.com/iron-io/iron_mq_php/issues)[1 PRs](https://github.com/iron-io/iron_mq_php/pulls)20MITPHPPHP &gt;=5.2.0

Since Aug 21Pushed 9mo ago29 watchersCompare

[ Source](https://github.com/iron-io/iron_mq_php)[ Packagist](https://packagist.org/packages/iron-io/iron_mq)[ Docs](http://github.com/iron-io/iron_mq_php)[ RSS](/packages/iron-io-iron-mq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (32)Used By (20)

IronMQ v4 PHP Client Library
----------------------------

[](#ironmq-v4-php-client-library)

[IronMQ](https://www.iron.io/platform/ironmq/) is an elastic message queue for managing data and event flow within cloud applications and between systems.

This library uses [IronMQ API v3](https://dev.iron.io/mq/3/reference/api/).

Branches
--------

[](#branches)

**If you're using laravel and see `"Class IronMQ not found"` error set `iron_mq` version to `1.*` and install/update dependencies**

- `1.*` - Laravel 4.0/4.1/4.2/5.0 compatible, PHP 5.2 compatible version. No namespaces. Using IronMQv2 servers (deprecated).
- `2.*` - Laravel 5.1/5.2 compatible, PSR-4 compatible version. With namespaces. Using IronMQv2 servers (deprecated).
- `3.*` - Laravel 4.0/4.1/4.2/5.0 compatible, PHP 5.2 compatible version. IronMQv3.
- `4.*` - (recommended) Laravel 5.1/5.2 compatible, PSR-4 compatible version. With namespaces. IronMQv3. Current default.
- `master` branch - same as `4.*`

Update notes
------------

[](#update-notes)

- 1.3.0 - changed argument list in methods `postMessage` and `postMessages`. Please revise code that uses these methods.
- 1.4.5 - added `getMessagePushStatuses` and `deleteMessagePushStatus` methods.
- 2.0.0 - version 2.0 introduced some backward incompatible changes. IronMQ client finally PSR-4 compatible and using namespaces &amp; other php 5.3 stuff. If you're migrating from previous (1.x) version, please carefully check how iron\_mq / iron\_core classes loaded. If you need some 1.x features like `.phar` archives, use latest 1.x stable version: [https://github.com/iron-io/iron\_mq\_php/releases/tag/1.5.3](https://github.com/iron-io/iron_mq_php/releases/tag/1.5.3)

Getting Started
---------------

[](#getting-started)

### Get credentials

[](#get-credentials)

To start using iron\_mq\_php, you need to sign up and get an oauth token.

1. Sign up [here](https://hud-e.iron.io/signup).
2. Get a token at

\--

### Install iron\_mq\_php

[](#install-iron_mq_php)

There are two ways to use iron\_mq\_php:

##### Using composer

[](#using-composer)

Create `composer.json` file in project directory:

```
{
    "require": {
        "iron-io/iron_mq": "4.*"
    }
}
```

Do `composer install` (install it if needed: )

And use it:

```
require __DIR__ . '/vendor/autoload.php';

$ironmq = new \IronMQ\IronMQ();
```

##### Using classes directly (strongly not recommended)

[](#using-classes-directly-strongly-not-recommended)

1. Copy classes from `src` to target directory
2. Grab IronCore classes [there](https://github.com/iron-io/iron_core_php) and copy to target directory
3. Include them all.

```
require 'src/HttpException.php';
require 'src/IronCore.php';
require 'src/IronMQ.php';
require 'src/IronMQException.php';
require 'src/IronMQMessage.php';
require 'src/JsonException.php';

$ironmq = new \IronMQ\IronMQ();
```

\--

### Configure

[](#configure)

Three ways to configure IronMQ:

- Passing array with options:

```
