Skip to content

Instantly share code, notes, and snippets.

View hunnycode's full-sized avatar

joohoun song hunnycode

View GitHub Profile
# encoding: utf-8
require 'rubygems'
require 'twilio-ruby'
account_sid = '<Account SID>'
auth_token = '<Auth Token>'
client = Twilio::REST::Client.new(account_sid, auth_token)
from = "+141xxxxxxxx"
# encoding: utf-8
require 'rubygems'
require 'twilio-ruby'
account_sid = "<Account SID>"
auth_token = "<Auth Token>"
client = Twilio::REST::Client.new(account_sid, auth_token)
from = "+141xxxxxxxx"
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say language="ja-JP">こんにちは、TwilioからSMSを送信します。</Say>
<Sms from="+141xxxxxxxx" to="+8180xxxxxxxx">TwilioからSMSを送ります。</Sms>
<Say language="ja-JP">SMSを送信しました。</Say>
</Response>
<?php
require("Services/Twilio.php");
$auth_tel_no = substr_replace($_POST['auth_tel_no'], "+81", 0,1);
$auth_no = $_POST['auth_no'];
$ACCOUNT_SID = "<account sid>"; // Your Twilio account sid
$AUTH_TOKEN = "<auth token>"; // Your Twilio auth token
$client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
<?php
mysql_connect('<database url>', '<id>', '<pwd>') or die(mysql_error());
mysql_select_db('<db>') or die(mysql_error());
$result = mysql_query('<data select>');
$row = mysql_fetch_assoc($result);
$val_two = $row['val_two'];
$val_two_strlen = strlen($val_two);
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say language="ja-JP">こんにちは</Say>
<Say language="fr-FR">Chapeau!</Say>
<Say language="ko-KR">반갑습니다.</Say>
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
中身
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial callerId="+8150A">+81399998877</Dial>
</Response>
<Response>
<Enqueue>twilio support</Enqueue>
</Response>
<Response>
<Dial>
<Queue>twilio support</Queue>
</Dial>
</Response>