-2
 <?php
       class SmsSenderManager{
            function sendSms($from,$to,$accountId,$token,$msg){
                   $strFromNumber = $from;
                   $strToNumber = $to;
                   $strMsg = $msg; 
                   $result = new stdClass();
                   require_once ("Services/Twilio.php");
                   $AccountSid = $accountId;
                   $AuthToken = $token;
                   $objConnection = new Services_Twilio($AccountSid, $AuthToken);
                   $bSuccess =                                                                                         $objConnection->account->sms_messages->create(
                           $strFromNumber,
                           $strToNumber,
                           $strMsg
                          );     
                  $result->content = $strMsg;
                  $result->success = true;
                  return $result;
                        }
                                                }
      ?>

above code sends SMS perfect but does not work on a live project when deployed on IIS server on windows server. I have seen few posts relevant to this problem but most have suggested to allow curl on the server. If so please tell how to enable curl on IIS server

Cœur
  • 37,241
  • 25
  • 195
  • 267
najam khan
  • 51
  • 8

1 Answers1

0

Problem was in SSL certificate over IIS server. just open TinyHttp.php in twilio lib: add CURLOPT_SSL_VERIFYPEER => FALSE, at $opts array

Megan Speir
  • 3,745
  • 1
  • 15
  • 25