This file contains 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 | |
// Get the PHP helper library from twilio.com/docs/php/install | |
require_once('../Services/Twilio.php'); // Loads the library | |
$sid = "ACxxxxxxxxxx"; | |
$token = "yyyyyyyyyyyyyy"; | |
$client = new Services_Twilio($sid, $token); | |
$call = $client->account->calls->get("CAxxxxxxxxxxx"); | |
echo $call->parent_call_sid; |
This file contains 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 | |
header("content-type: text/xml"); | |
// Connect to MySQL, and connect to the Database | |
mysql_connect('DB URL', 'ID', 'PWD') or die(mysql_error()); | |
mysql_select_db('database') or die(mysql_error()); | |
// 発信者番号を取得します。 | |
$tel_from = $_POST['From']; | |
// 録音ファイルのURLを取得します。 |
This file contains 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 | |
header("content-type: text/xml"); | |
?> | |
<Response> | |
<?PHP if (empty($_POST["Digits"])): ?> | |
<Say language="ja-jp">サンタさんにメッセージをおくるには 1を, メッセージの再生は 2を, 押してください。</Say> | |
<Gather numDigits="1" timeout="30" /> | |
<?PHP elseif ($_POST["Digits"] == "1"): ?> | |
<Say language="ja-jp">録音完了後, 電話器のボタンをどれか 押してください。</Say> | |
<Record action="santa.php" /> |
This file contains 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 | |
header('Content-type: text/xml'); | |
echo '<?xml version="1.0" encoding="UTF-8" ?>'; | |
$key = $_REQUEST['Digits']; | |
?> | |
<Response> | |
<?php | |
if ($key == '1234') | |
{ |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Response> | |
<Gather action="room-check.php" numDigits="4"> | |
<Say language="ja-jp">ルーム番号を4桁で入力してください。</Say> | |
</Gather> | |
<!-- 入力に間違いがあるとリトライします。 --> | |
<Redirect /> | |
</Response> |
This file contains 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
<Response> | |
<Say language="ja-jp">Twilioカンファレンスへようこそ!</Say> | |
<Dial> | |
<Conference>twilioConferenceRoom</Conference> | |
</Dial> | |
</Response> |
This file contains 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
<Response> | |
<Say language="ja-jp">Twilioカンファレンスへようこそ!</Say> | |
<Dial> | |
<Conference waitUrl="https://api.twilio.com/Cowbwell.mp3">twilioConferenceRoom</Conference> | |
</Dial> | |
</Response> |
This file contains 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'); | |
$account_sid = "ACxxxxxxxxxx"; // Twilio account sid | |
$auth_token = "yyyyyyyyyyyyy"; // Twilio auth token | |
$client = new Services_Twilio($account_sid, $auth_token); | |
$call = $client->account->calls->create( | |
'+8150xxxxyyyy', // Twilio電話番号 |
This file contains 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_once('../Services/Twilio.php'); // Loads the library | |
// Your Account Sid and Auth Token from twilio.com/user/account | |
$sid = "ACxxxxxxxxxxxx"; | |
$token = "yyyyyyyyyyyy"; | |
$client = new Services_Twilio($sid, $token); | |
foreach ($client->account->incoming_phone_numbers as $number) { | |
if ( $number->phone_number == "+8150xxxxyyyy") { |
This file contains 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'); | |
$account_sid = "ACXXXXXX"; // Account Sid | |
$auth_token = "YYYYYY"; // Auth Token | |
$client = new Services_Twilio($account_sid, $auth_token); | |
$message = $client->account->messages->sendMessage( | |
'+1xxxxyyyyy', // From a Twilio number in your account | |
'+8180xxxxyyyy', // Text any number |
NewerOlder