PHP code example of zircote / amqp

1. Go to this page and download the library: Download zircote/amqp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zircote / amqp example snippets




$amqp = 'amqp://user:pass@hostname:port/vhost';

// Options Options Array
$options = array(
    'insist' => false,
    'login_method' => \AMQP\Connection::AMQP_AUTH_PLAIN,
    'login_response' => null,
    'locale' => 'en_US',
    'connection_timeout' => 3,
    'read_write_timeout' => 3,
    'context' => null,
    'ssl_options' => array()
);
$connection = new \AMQP\Connection($amqp, $options);






define('AMQP_DEBUG', true);

... more code