• <legend id='7zT1T'><style id='7zT1T'><dir id='7zT1T'><q id='7zT1T'></q></dir></style></legend>
    <i id='7zT1T'><tr id='7zT1T'><dt id='7zT1T'><q id='7zT1T'><span id='7zT1T'><b id='7zT1T'><form id='7zT1T'><ins id='7zT1T'></ins><ul id='7zT1T'></ul><sub id='7zT1T'></sub></form><legend id='7zT1T'></legend><bdo id='7zT1T'><pre id='7zT1T'><center id='7zT1T'></center></pre></bdo></b><th id='7zT1T'></th></span></q></dt></tr></i><div id='7zT1T'><tfoot id='7zT1T'></tfoot><dl id='7zT1T'><fieldset id='7zT1T'></fieldset></dl></div>

        <bdo id='7zT1T'></bdo><ul id='7zT1T'></ul>

      <small id='7zT1T'></small><noframes id='7zT1T'>

      <tfoot id='7zT1T'></tfoot>

        如何接收短信并根据短信内容拨打电话提醒某人?

        How do I take an SMS and make a call to alert someone based on what SMS says?(如何接收短信并根据短信内容拨打电话提醒某人?)
              <legend id='mfW5x'><style id='mfW5x'><dir id='mfW5x'><q id='mfW5x'></q></dir></style></legend>
              • <bdo id='mfW5x'></bdo><ul id='mfW5x'></ul>

                <small id='mfW5x'></small><noframes id='mfW5x'>

                • <tfoot id='mfW5x'></tfoot>

                    <tbody id='mfW5x'></tbody>
                • <i id='mfW5x'><tr id='mfW5x'><dt id='mfW5x'><q id='mfW5x'><span id='mfW5x'><b id='mfW5x'><form id='mfW5x'><ins id='mfW5x'></ins><ul id='mfW5x'></ul><sub id='mfW5x'></sub></form><legend id='mfW5x'></legend><bdo id='mfW5x'><pre id='mfW5x'><center id='mfW5x'></center></pre></bdo></b><th id='mfW5x'></th></span></q></dt></tr></i><div id='mfW5x'><tfoot id='mfW5x'></tfoot><dl id='mfW5x'><fieldset id='mfW5x'></fieldset></dl></div>

                  本文介绍了如何接收短信并根据短信内容拨打电话提醒某人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  所以我正在尝试接收收到的短信,并根据短信的内容拨打带有特定录音的电话.

                  So I am trying to take an incoming SMS and based on what the SMS says make a call with a specific recording.

                  例如:

                  我有一个带有调制解调器的门传感器,当门打开或门关闭时,它可以向我的 twilio # 发送文本.

                  I have a door sensor with a modem that can send a text to my twilio # when the door is open or when the door is closed.

                  如果 Twilio 收到开门"的文本,那么 twilio 会打电话给我的手机并播放开门"的录音

                  If Twilio receives "door open" text then twilio will call my cell phone and plays recording that says "door is open"

                  如果 Twilio 收到门已关闭"的文本,那么 twilio 将拨打我的手机并播放门已关闭"的录音

                  If Twilio receives "door closed" text then twilio will call my cell phone and plays recording that says "door is closed"

                  <?php
                      require_once('/home/protranx/public_html/twilio-php-      latest/Services/Twilio.php');
                  
                  
                      $sid = "SID";
                      $token = "Token";
                      $client = new Services_Twilio($sid, $token);
                      $alert = $_REQUEST['body'];
                  
                      $TwilioNumber = "+twilio #";
                      $to = "+my cell #";
                      $url1 = "http://protran.x10.mx/Oak1_armed_door_open.php";
                      $url2 = "http://protran.x10.mx/Oak1_disarmed_door_closed.php";
                  
                      $string1 = "door open";
                      $string2 = "door closed"; 
                  
                      if ($alert == $string1){
                          $call = $client->account->calls->create($TwilioNumber, $to, $url1);}
                  
                  
                      elseif ($alert == $string2){
                          $call = $client->account->calls->create($TwilioNumber, $to, $url2);}
                  echo $call->sid;
                  
                  
                  header('content-type: text/xml');
                  echo "<?xml version="1.0" encoding="UTF-8"?>
                  ";
                  ?>
                  <Response>
                  </Response>
                  

                  我不断收到此错误:错误:12100 - 文档解析失败

                  I keep getting this error: Error: 12100 - Document parse failure

                  任何帮助将不胜感激.

                  谢谢

                  推荐答案

                  Twilio 布道者在这里.

                  Twilio evangelist here.

                  很难从您的代码中看出,因为它通常看起来是正确的.

                  Hard to tell from your code, as it generally looks right.

                  偶尔让我感到困惑的一件事是在 xml 开始之前或 xml 声明和根元素之间呈现空格,因此您可能会检查其中任何一个,因为这些可能难以捕捉.

                  One thing that occasionally trips me up is spaces being rendered before the start of the xml or between the xml declaration and the root element, so you might check for either of those that since those can be hard to catch.

                  例如,我不确定您是否需要 xml 声明末尾的换行符.

                  For example, I'm not sure you need the newline that you have at the end of your xml declaration.

                  希望有所帮助.

                  这篇关于如何接收短信并根据短信内容拨打电话提醒某人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tfoot id='sMjh0'></tfoot>
                    <tbody id='sMjh0'></tbody>
                    <legend id='sMjh0'><style id='sMjh0'><dir id='sMjh0'><q id='sMjh0'></q></dir></style></legend>
                    <i id='sMjh0'><tr id='sMjh0'><dt id='sMjh0'><q id='sMjh0'><span id='sMjh0'><b id='sMjh0'><form id='sMjh0'><ins id='sMjh0'></ins><ul id='sMjh0'></ul><sub id='sMjh0'></sub></form><legend id='sMjh0'></legend><bdo id='sMjh0'><pre id='sMjh0'><center id='sMjh0'></center></pre></bdo></b><th id='sMjh0'></th></span></q></dt></tr></i><div id='sMjh0'><tfoot id='sMjh0'></tfoot><dl id='sMjh0'><fieldset id='sMjh0'></fieldset></dl></div>
                      • <bdo id='sMjh0'></bdo><ul id='sMjh0'></ul>

                          <small id='sMjh0'></small><noframes id='sMjh0'>