Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

A Simple Way to Receive an SMS with PHP and Twilio

Blog post from Twilio

Post Details
Company
Date Published
Author
Greg Baugues
Word Count
508
Company Posts That Month
24
Language
English
Hacker News Points
-
Post removed?
No
Summary

To receive and reply to an SMS with PHP and Twilio, create a file named `message.php` that contains code to parse the incoming request and send back an HTTP response with instructions for what Twilio should do next. The response takes the form of TwiML, a subset of XML used to relay instructions back to Twilio, which expects an HTTP response in return. The code needs to have a publicly accessible URL for Twilio to reach it, so push it to a server or use ngrok to open a tunnel to localhost. After setting up a free Twilio account and buying a phone number, fill in the full path to the `message.php` file and click Save to receive an SMS and see a customized response.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.