Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Sending and Receiving SMS with Laravel and Nexmo
Aug 05, 2016 @ 17:36:05

On the Laravel News site they've posted a tutorial from Phil Leggetter showing you how to integrate your application with Nexmo to be able to send and receive SMS messages in your Laravel application.

In this quick tutorial by Phil Leggetter, we’ll cover how you can both send and receive SMS from your Laravel application. We’ll do this using Nexmo, a cloud communications platform that offers APIs for provisioning phone numbers, sending and receiving SMS (which is handy since we’ll use that), making and receiving phone calls and more.

He starts off with some prerequisites you'll need to get the system working (including an account on Nexmo and their command line tool). They create a fresh Laravel application and integrate the Nexmo PHP package into it as a service provider. With that installed he shows how to send an SMS message to a phone number, how to "rent" a number they can reply to and receiving the callback when they send a response. The post finishes with the setup of an "auto-responder" that just confirms that the message was received.

tagged: nexmo laravel tutorial integration send receive message rent number

Link: https://laravel-news.com/2016/08/sending-receiving-sms-laravel-nexmo/

AWS PHP Development:
Receiving Amazon SNS Messages in PHP
Apr 01, 2014 @ 15:53:14

The Amazon Web Services PHP Development blog has a new post from Jeremy Lindblom showing you how you can receive inbound SNS messages via a webhook on your application.

Amazon Simple Notification Service (Amazon SNS) is a fast, fully-managed, push messaging service. Amazon SNS can deliver messages to email, mobile devices, Amazon SQS queues, and HTTP/HTTPS endpoints. [...] Though you can certainly subscribe your email address to receive SNS messages from service events like these, your inbox would fill up rather quickly. There is great power, however, in being able to subscribe an HTTP/HTTPS endpoint to receive the messages. This allows you to program webhooks for your applications to easily respond to various events.

Using the AWS SDK for PHP you can set up a listening script that can receive the message and handle subscription confirmations, message signature validation and handling the notifications.

tagged: amazon aws sns message receive webhook sdk

Link: http://blogs.aws.amazon.com/php/post/Tx2G9D94IE6KPAY/Receiving-Amazon-SNS-Messages-in-PHP

PHPMaster.com:
Implement Two-Way SMS with PHP
Jul 17, 2012 @ 13:46:22

PHPMaster.com has an interesting new article posted today showing how you can use PHP to create a two-way messaging (SMS) application that can both send and initiate actions based on message content.

SMS is used for various purposes these days. For example, major websites like Gmail and Facebook use SMS to improve their authentication process with multi-factor authentication and notifying users about the updates. These are one-way SMS applications since messages are sent only from these sites to the user. Two-way SMS applications are more complex than one-way ones. In two-way SMS apps, a user can initiate a conversation by sending messages, and then the application responds according to the user’s commands.

They base the application on the Clickatell SMS service (not free, but cheap - pay by the message too) which includes the ability to hook into your API on a specific endpoint and relay the message data. The message can either be sent via a POST or GET and can easily be interpreted in your app extracting things like a timestamp, the number it came from and, of course, the actual text of the message. There's also a section about the "User Data Header" functionality that lets you easily split up a message for recombination on the remote device. Code is included for all examples.

tagged: sms tutorial bidirectional send receive

Link:


Trending Topics: