In this new tutorial on PHPMaster.com, Timothy Boronczk looks at using the Twilio API and multi-factor authentication.
You can make and receive phone calls and send and receive text messages using TwiML (Twilio Markup Language) and their REST API. You can work directly with the API, or use one of the available helper libraries. The library I’m using is twilio-php, which is the library released and officially supported by Twilio.
He shows you how to use the Twilio API library to create a connection object to their REST API and perform various actions like sending an SMS and placing a phone call. the code to built the multi-factor authentication is also included - a user login/password is checked against a database and a form is displayed (depending on if they want to voice call or SMS).