Update api.twilo.php

This commit is contained in:
Namhyeon Go 2019-04-15 10:58:16 +09:00 committed by GitHub
parent 2b5ae71d10
commit fba64d4079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,3 +8,22 @@
loadHelper("twilio.api");
$action = get_requested_value("action");
$from = get_requested_value("from");
$to = get_requested_value("to");
$sid = "";
$token = "";
switch($action) {
case "message":
$response = twilio_send_message($message, $from, $to, $sid, $token);
break;
case "voice":
$response = twilio_send_voice("", $from, $to, $sid, $token);
break;
}
header("Content-Type: application/json");
echo json_encode($response);