This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function decamelize($word) | |
| { | |
| return preg_replace( | |
| '/(^|[a-z])([A-Z])/e', | |
| 'strtolower(strlen("\\1") ? "\\1_\\2" : "\\2")', | |
| $word | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function decamelize($word) | |
| { | |
| $callback = create_function('$matches', | |
| 'return strtolower(strlen("$matches[1]") ? | |
| "$matches[1]_$matches[2]" : "$matches[2]");'); | |
| return preg_replace_callback( | |
| '/(^|[a-z])([A-Z])/', | |
| $callback, | |
| $word |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (in_array('curl', get_loaded_extensions())) { | |
| $_http = new Services_Twilio_TinyHttp( | |
| "https://api.twilio.com", | |
| array("curlopts" => array( | |
| CURLOPT_USERAGENT => self::USER_AGENT, | |
| CURLOPT_HTTPHEADER => array('Accept-Charset: utf-8'), | |
| CURLOPT_CAINFO => dirname(__FILE__) . '/cacert.pem', | |
| )) | |
| ); | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'Services/Twilio.php'; | |
| $response = new Services_Twilio_Twiml(); | |
| $response->say('Hello Monkey'); | |
| print $response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'Services/Twilio.php'; | |
| include 'credentials.php'; | |
| $client = new Services_Twilio($AccountSid, $AuthToken); | |
| $call = $client->account->sms_messages->create( | |
| '1512-555-1212', // From this number | |
| '1703-555-1212', // Send to this number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| application: examplehelloworld | |
| version: 1 | |
| runtime: php | |
| api_version: 1 | |
| threadsafe: true | |
| handlers: | |
| - url: .* | |
| script: main.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| application: examplehelloworld | |
| version: 1 | |
| runtime: php | |
| api_version: 1 | |
| threadsafe: true | |
| handlers: | |
| - url: /images | |
| static_dir: images |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'Services/Twilio.php'; | |
| include 'credentials.php'; | |
| $client = new Services_Twilio($AccountSid, $AuthToken); | |
| $call = $client->account->calls->create( | |
| '1512-555-1212', // From this number | |
| '17035551212', // Send to this number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'Services/Twilio.php'; | |
| include 'credentials.php'; | |
| $client = new Services_Twilio($AccountSid, $AuthToken); | |
| $call = $client->account->sms_messages->create( | |
| '1512-555-1212', // From this number | |
| '17035551212', // Send to this number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'Services/Twilio.php'; | |
| /** | |
| * UN is the oddity | |
| */ | |
| $items = array('CIA', 'NBC', 'CNN', 'HTTP', 'http', 'UTC', 'UN'); | |
| $response = new Services_Twilio_Twiml(); |