Skip to content

Commit e1cb539

Browse files
committed
Merge pull request #3 from aws/fix/add-something-to-the-readme
Add a quick description and example to the readme
2 parents 3212fbc + 6d688e3 commit e1cb539

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
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+
```

0 commit comments

Comments
 (0)