diff options
author | Mario Celi <mceli@stackbuilders.com> | 2016-08-29 09:21:18 -0500 |
---|---|---|
committer | Mario Celi <mceli@stackbuilders.com> | 2016-08-29 09:22:47 -0500 |
commit | 85fa7c8181f06d8d0542547e53984a3870a7b1b7 (patch) | |
tree | a47761c911386d28875bc05432b06d0706951ee2 | |
parent | 485b2650bb125c185cb72c91d360e0b951548099 (diff) | |
download | twilio-php-85fa7c8181f06d8d0542547e53984a3870a7b1b7.zip twilio-php-85fa7c8181f06d8d0542547e53984a3870a7b1b7.tar.gz twilio-php-85fa7c8181f06d8d0542547e53984a3870a7b1b7.tar.bz2 |
Update README file examples to use the latest library interface. Resolves #367origin/update-readme-file
-rw-r--r-- | README.md | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -20,11 +20,11 @@ $sid = "ACXXXXXX"; // Your Account SID from www.twilio.com/console $token = "YYYYYY"; // Your Auth Token from www.twilio.com/console $client = new Twilio\Rest\Client($sid, $token); -$message = $client->account->messages->create( - '9991231234', // From a valid Twilio number +$message = $client->messages->create( '8881231234', // Text this number array( - 'Body' => "Hello from Twilio!" + 'from' => '9991231234', // From a valid Twilio number + 'body' => 'Hello from Twilio!' ) ); @@ -39,12 +39,14 @@ $sid = "ACXXXXXX"; // Your Account SID from www.twilio.com/console $token = "YYYYYY"; // Your Auth Token from www.twilio.com/console $client = new Twilio\Rest\Client($sid, $token); -$call = $client->account->calls->create( - '9991231234', // From a valid Twilio number - '8881231234', // Call this number - // Read TwiML at this URL when a call connects (hold music) - 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient' +// Read TwiML at this URL when a call connects (hold music) +$call = $client->calls->create( + '8881231234', // Call this number + '9991231234', // From a valid Twilio number + array( + 'url' => 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient' + ) ); ``` @@ -52,7 +54,7 @@ $call = $client->account->calls->create( To control phone calls, your application needs to output [TwiML](http://www.twilio.com/docs/api/twiml/ "Twilio Markup Language"). Use -`Services_Twilio_Twiml` to easily create such responses. +`Twilio\Twiml` to easily create such responses. ```php <?php |