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 'functions.php'; | |
| header("Content-type: text/xml"); | |
| $response = new Services_Twilio_Twiml(); | |
| $response->dial($toPhone); | |
| 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 | |
| include 'functions.php'; | |
| header("Content-type: text/xml"); | |
| $from = preg_replace("/[^0-9]/", "", $_POST['From']); | |
| $response = new Services_Twilio_Twiml(); | |
| $response->dial($toPhone, array('timeout' => 5)); | |
| $response->say('Please leave your message after the tone'); |
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 'functions.php'; | |
| header("Content-type: text/xml"); | |
| $filter = "!@#$^&%*()+=-[]\/{}|:<>?,."; | |
| $recording = preg_replace("/[$filter]/", "", $_POST['RecordingUrl']); | |
| $duration = (int) $_POST['RecordingDuration']; |
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 'functions.php'; | |
| header("Content-type: text/xml"); | |
| $whitelist = array('17035551212', '12025551212'); | |
| $from = preg_replace("/[^0-9]/", "", $_POST['From']); |
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 | |
| // There is not the entire file, download the full package from Github. | |
| { | |
| if (in_array($number, $whitelist)) { | |
| return true; | |
| } | |
| $currentHour = date('G'); | |
| if (($starttime <= $currentHour) && ($currentHour < $endtime)) { |
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 'functions.php'; | |
| /** | |
| * Now we'll combine Revision 3 with an interface to put some fine-grained | |
| * control of the white and blacklists via SMS. | |
| */ | |
| $from = preg_replace("/[^0-9]/", "", $_POST['From']); |
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 | |
| // There is not the entire file, download the full package from Github. | |
| function process_command($message) | |
| { | |
| $message = preg_replace('!\s+!', ' ', $message); | |
| $words = explode(' ', $message); | |
| $response = "Unknown command. Use: allow, block, remove, status, or name with a phone number to manage your lists"; |
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 | |
| $mapped = array(); | |
| spiderAPI('https://XXXX@api.twilio.com/2010-04-01'); | |
| function spiderAPI($url) { | |
| global $mapped; | |
| $url = str_replace('XXXX', 'ACxxxx:authToken', $url); | |
| $xml = simplexml_load_file($url); |
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 the Twilio PHP library | |
| require "Services/Twilio.php"; | |
| // Set your AccountSid and AuthToken from www.twilio.com/user/account | |
| $AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
| $AuthToken = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"; | |
| // Instantiate a new Twilio Rest Client | |
| $client = new Services_Twilio($AccountSid, $AuthToken); |
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 the Twilio PHP library | |
| require 'Services/Twilio.php'; | |
| // Set our Account SID and AuthToken | |
| $sid = 'AC123'; | |
| $token = 'abcd'; | |
| // A phone number you have previously validated with Twilio | |
| $phonenumber = '4151234567'; |