Created
January 31, 2014 20:46
-
-
Save maclover7/8742788 to your computer and use it in GitHub Desktop.
twilio probs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('Services/Twilio.php'); | |
function guide(){ | |
$response = new Services_Twilio_Twiml(); | |
$response->sms("Blah."); | |
echo $response; | |
} | |
$body = $_REQUEST['Body']; | |
$result = preg_replace("/[^A-Za-z0-9]/u", " ", $body); | |
$result = trim($result); | |
$result = strtolower($result); | |
switch ($result) { | |
case 'hi’': | |
guide(); | |
break; | |
default: | |
index(); | |
} |
Twilio is showing a 500 error, other than that, not sure.
Have you tried making the request yourself?
Yeah, I've texted in many times. It's saying that there's no response.
What's the response code when you test it?
500
Nothing gets texted back
That's weird.
Try commenting it all out and re-enabling parts until you get a 200.
Gotcha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, what's going wrong?