First, let's learn how to receive picture messages. This is similar to how we receive text messages; the only difference is that picture messages using MMS also include a field named
, which contains the URL that was attached to the message.
We will begin by setting up a file named
listener.php, which is where we will configure Twilio to send our messages. This script will store all incoming messages in a MySQL database and download the attached image locally. Then we will set up a file named
messages.php, which will display the message along with the image.
The complete code for this recipe can be found in the
Let's set up our
listener.php file to store all incoming ...