简体   繁体   English

AWS SNS确认订阅PHP

[英]AWS SNS ConfirmationSubscription PHP

Can someone provide a tutorial or guide on how to do ConfirmationSubscription of AWS SNS using PHP? 有人可以提供有关如何使用PHP进行AWS SNS的ConfirmationSubscription的教程或指南吗? I've already search in the internet but found out results dated 2010 to 2015 and it doesn't work properly. 我已经在互联网上进行搜索,但发现了2010年至2015年的搜索结果,但无法正常运行。

Should I work using AWS PHP SDK v3? 我应该使用AWS PHP SDK v3吗?

If yes, will I have to set my AWS credential using SNS Client? 如果是,我是否必须使用SNS Client设置我的AWS凭证?

Please needed guidance. 请需要指导。 TY TY

Solution: 解:

https://packagist.org/packages/aws/aws-php-sns-message-validator https://packagist.org/packages/aws/aws-php-sns-message-validator

  • Follow the SNS ConfirmationSubscription section. 请遵循“ SNS确认订阅”部分。
  • Make sure you be able to get the post data then get the SubscribeUrl. 确保您能够获取帖子数据,然后获取SubscribeUrl。
  • Once you have the SubscribeUrl, use http-client( https://github.com/yiisoft/yii2-httpclient ) to perform get and send operation. 有了SubscribeUrl后,请使用http-client( https://github.com/yiisoft/yii2-httpclient )执行获取和发送操作。

$response = $httpClient->get(stripslashes($postMessageArr['SubscribeURL']))->send(); $ response = $ httpClient-> get(stripslashes($ postMessageArr ['SubscribeURL']))-> send();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM