PHP code example of magroski / simple-sqs

1. Go to this page and download the library: Download magroski/simple-sqs 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/ */

    

magroski / simple-sqs example snippets


$config = new Config('access_key', 'secret_key', 'ue-east-1', 'https://sqs.queue.url');

$client = new Client($config);

$data = json_encode(['book' => 1]);

# Real-time
$client->sendMessage($data);

# With 1 minute delay
$client->sendDelayedMessage($data, 60);