https://github.com/settermjd/send-sms-with-php-and-twilio
See how to send an SMS with PHP in one function call; or about seven nicely formatted lines of code.
https://github.com/settermjd/send-sms-with-php-and-twilio
Last synced: 2 months ago
JSON representation
See how to send an SMS with PHP in one function call; or about seven nicely formatted lines of code.
- Host: GitHub
- URL: https://github.com/settermjd/send-sms-with-php-and-twilio
- Owner: settermjd
- License: apache-2.0
- Created: 2024-04-11T01:00:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T01:28:43.000Z (about 2 years ago)
- Last Synced: 2025-12-26T20:14:47.027Z (6 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Send an SMS with PHP and Twilio's Programmable Messaging API
[](#license)
[](https://github.com/settermjd/send-sms-with-php-and-twilio/issues)

See how to send an SMS with PHP in one function call; or about seven nicely formatted lines of code.
## Getting Started
### Requirements
To use the code, you need the following:
- [PHP](https://php.net) 8.3
- [Composer](https://getcomposer.org) installed globally
- A Twilio account (free or paid). If you are new to Twilio, [click here to create a free account](https://www.twilio.com/referral/QlBtVJ)
### Setup the code
To use the project only requires three things:
1. Clone the code
1. Install the required dependencies
1. Create a _.env_ file from _.env.example_
1. Set your Twilio credentials and mobile phone number in _.env_
1. Run the code
Do steps 1 - 3 with the following commands:
```php
# Clone the source code locally into a directory named send-sms-with-php-and-twilio
git clone git@github.com:settermjd/send-sms-with-php-and-twilio.git
# Install PHP's dependencies
composer install
cp -v .env.example .env
```
You can retrieve your Twilio credentials and phone number from the [Twilio Console](https://console.twilio.com/).
After running the code, you should receive an SMS to your mobile/cell phone.
## Contributing
This repository is Open Source under the [Apache License 2.0](LICENSE), and is the [copyright of its contributors](NOTICE).
If you would like to contribute to the software, you must:
1. Read the [Developer Certificate of Origin Version 1.1]()
2. Sign all commits to the project
This ensures that users, distributors, and other contributors can rely on all the software related to Daytona being contributed under the terms of the [License](LICENSE). No contributions will be accepted without following this process.
Afterward, navigate to the [contributing guide](CONTRIBUTING.md) to get started.
## License
This repository is covered under the [Apache License 2.0](LICENSE), except where noted.
## Code of Conduct
This project has adapted the Code of Conduct from the [Contributor Covenant](https://www.contributor-covenant.org/). For more information see the [Code of Conduct](CODE_OF_CONDUCT.md) or contact [matthew@matthewsetter.com](mailto:matthew@matthewsetter.com) with any additional questions or comments.