Bulvak Bulvak - 7 months ago 24
PHP Question

Twilio setting up help....Cant even run basic apps.....PHP

This is very disappointing and discouraging...I decided to use Twilio and there is a serious lack of documentation on their website....I am trying to use the Twilio PHP library but I am getting nothing but error and their staff takes hours to reply with vague answers...

Here is my code....I have twilio.php which is the library in same folder as my code but it isnt working just gives errors...Any ideas? I have tried everything I could for past 10 hours just to get a basic script running that uses the php library...

<?php



include ('twilio.php')

<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/dial_callstatus.xml -->
<Response>
<Dial action="/handleDialCallStatus.php" method="GET">
6478804808
</Dial>
<Say>I am unreachable</Say>
</Response>


?>

Answer

For starters, you have non-PHP code in your PHP block.

<?php include ('twilio.php') ?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/dial_callstatus.xml -->
<Response>
    <Dial action="/handleDialCallStatus.php" method="GET">
        6478804808
    </Dial>
    <Say>I am unreachable</Say>
</Response>