0

i want write a demo use twilio with php,i have succee in useing offical demo like this

$client = new Services_Twilio($AccountSid, $AuthToken);
  $message = $client->account->calls->create(
    $accountData["From"],
    $accountData["To"],
    $accountData["voice-url"]
  );

$accountData["voice-url"] is a demo voice url,now i want say somthing different,i have no public server,so i can't make a restAPI,can i make a response in local?

<Reponse>
   <Say>hahahaha</Say>
</Reponse>
yang
  • 183
  • 12
  • i have got another way to get a response from internet,twilio provide a method [enter link description here](http://www.twilio.com/labs),it solve my problem – yang Oct 29 '15 at 07:20

1 Answers1

0

Ricky from Twilio here.

We're pretty huge fans of using a tool called ngrok to tunnel localhost to the outside world for this specific use case. Once you install ngrok you can run:

./ngrok http PORT_YOUR_LOCAL_SERVER_RUNS_ON

It'll spit out a publicly accessible URL that you can pass to Twilio when you initiate your call.

Hope that helps!

rickyrobinett
  • 1,224
  • 10
  • 13
  • thank you for answering me .your method is a way to visit my localhost,but i think it may sot suit me ,thanks anyway. – yang Oct 29 '15 at 07:16
  • Sorry that wasn't what you were looking for. Another option you could try in addition to twimlets would be to use twimlbin.com to store your twiml. – rickyrobinett Oct 29 '15 at 13:16