如何使用twilio.com和php编码调用mobile no
这是html代码如何使用twilio.com和php编码调用mobile no,php,html,phpmyadmin,computer-science,Php,Html,Phpmyadmin,Computer Science,这是html代码 <!DOCTYPE html> <html> <head> <title>Automated call form</title> </head> <body> <h1>Automated Call Form</h1> <p>Fill in all fields and click <b>Make this call</b>
<!DOCTYPE html>
<html>
<head>
<title>Automated call form</title>
</head>
<body>
<h1>Automated Call Form</h1>
<p>Fill in all fields and click <b>Make this call</b>.</p>
<form action="twilio.php" method="post">
<table>
<tr>
<td>To:</td>
<td><input name="callTo" size="50" type="text" value=""></td>
</tr>
<tr>
<td>From:</td>
<td><input name="callFrom" size="50" type="text" value=""></td>
</tr>
<tr>
<td>Call message:</td>
<td><input name="callText" size="100" type="text" value="Hello. This is the call text. Good bye."></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Make this call"></td>
</tr>
</table>
</form><br>
</body>
</html>
自动呼叫表
自动呼叫表
填写所有字段,然后单击拨打此电话
致:
发件人:
通话信息:
这是php编码
<html>
<head><title>Making a call</title></head>
<body>
<p>Your call is being made.</p>
<?php
//require_once 'path/to/vendor/autoload.php';
$sid = "ACd544115bc5442c8633f2483e09318048";
$token = "6514bba4074a8c7b3df634aff9045874";
$from_number = $_POST['callFrom']; // Calls must be made from a registered Twilio number.
$to_number = $_POST['callTo'];
$message = $_POST['callText'];
$client = new Twilio\Rest\Client($sid, $token);
$call = $client->calls->create(
$to_number,
$from_number,
array(
'url' => 'https://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient')
);
echo "Call status: " . $call->status . "<br />";
echo "URI resource: " . $call->uri . "<br />";
?>
</body>
</html>
打电话
有人打电话给你
我在twilio.com上注册,该网站提供通信设施,但我不知道如何正确使用
在html文件中,只需填写从和到使用呼叫的输入号码,但当我单击拨打按钮时,我的号码中没有呼叫转接或接收