File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 11# Amazon SNS message Validator for PHP
22
3+ [ ![ @awsforphp on Twitter] ( http://img.shields.io/badge/twitter-%40awsforphp-blue.svg?style=flat )] ( https://twitter.com/awsforphp )
4+ [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/aws/aws-php-sns-message-validator.svg?style=flat )] ( https://packagist.org/packages/aws/aws-php-sns-message-validator )
5+ [ ![ Build Status] ( https://img.shields.io/travis/aws/aws-php-sns-message-validator.svg?style=flat )] ( https://travis-ci.org/aws/aws-php-sns-message-validator )
6+ [ ![ Apache 2 License] ( https://img.shields.io/packagist/l/aws/aws-php-sns-message-validator.svg?style=flat )] ( http://aws.amazon.com/apache-2-0/ )
7+
8+ The ** Amazon SNS Message Validator for PHP** allows you to validate that incoming
9+ HTTP(S) messages are legitimate SNS notifications. This library does not depend
10+ on the AWS SDK for PHP or Guzzle, but it does require that the OpenSSL PHP
11+ extension be installed.
12+
13+ ## Usage
14+
15+ ``` php
16+ <?php
17+
18+ require 'vendor/autoload.php';
19+
20+ use Aws\Sns\Message;
21+ use Aws\Sns\MessageValidator;
22+
23+ $message = Message::fromRawPostData();
24+
25+ // Validate the message
26+ $validator = new MessageValidator();
27+ if ($validator->isValid($message)) {
28+ // do something with the message
29+ }
30+ ```
You can’t perform that action at this time.
0 commit comments