PHP code example of referly / better-sqs-php
1. Go to this page and download the library: Download referly/better-sqs-php 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/ */
referly / better-sqs-php example snippets
use BetterAwsPhpCore\Configuration;
$configuration = new Configuration;
$client = new Client($configuration);
$queueName = 'someSqsQueueName';
$client->push($queueName, 'can you see this amazing message?');
$queueName = 'someSqsQueueName';
$message = $client->reserve($queueName);
echo "The message is {$message->body()} with receipt {$message->receiptHandle()}";
$message->delete();