Last active
September 10, 2015 02:13
-
-
Save hunnycode/db0b915b5ad30bbaa95d to your computer and use it in GitHub Desktop.
電話API? Twilio? PHPから電話の発信ができちゃいます!! ref: http://qiita.com/joohounsong/items/f516f4e1f6c91572e7f5
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> | |
<Say language="ja-jp">Twilioへようこそ。</Say> | |
</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"); // PHPライブラリ | |
$sid = "ACxxxxxxxxxxxxxxxx"; // Account Sid | |
$token = "yyyyyyyyyyyyyyyy"; // Auth Token | |
$tel_to = "+8180xxxxyyyy"; // 発信先電話番号 | |
$tel_from = "+8150xxxxyyyy"; // 発信元電話番号 | |
$twiml = "http://xxx.xxx.xxx.xxx/twilio/calling.xml"; // TwiML URL | |
$client = new Services_Twilio($sid, $token); | |
$call = $client->account->calls->create($tel_from, $tel_to, $twiml); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment