Sending and receiving group chats
Being able to hold a conversation with a group is cool and fun and can be useful for events. This recipe will let you store all conversations for a group in the database and send replies to each member.
Getting ready
The complete source code for this recipe can be found in the Chapter6/Recipe6/
folder.
How to do it...
We're going to build a simple app that will send and receive messages to and from a group of people. This app will forward any message received at the designated phone number of the people on the group list and send any messages you choose as well.
Download the Twilio Helper Library from https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.Upload
config.php
to your website and make sure the following variables are set as follows:<?php session_start(); $accountsid = ''; // YOUR TWILIO ACCOUNT SID $authtoken = ''; // YOUR TWILIO AUTH TOKEN $fromNumber = ''; // PHONE NUMBER CALLS...