<?php
// Require the bundled autoload file - the path may need to change
// based on where you downloaded and unzipped the SDK
require_once __DIR__ . '/twilio-php-master/Twilio/autoload.php';
#require __DIR__ . '/var/sip10/public_html/htdocs/twilio/twilio-php-master/Twilio/autoload.php';
// Use the REST API Client to make requests to the Twilio REST API
use Twilio\Rest\Client;
// Your Account SID and Auth Token from twilio.com/console
$sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXX';
$token = 'XXXXXXXXXXXXXXXXXXXXXXX';
$client = new Client($sid, $token);
// Use the client to do fun stuff like send text messages!
$client->messages->create(
'+1XXXXXXXXXX',
array(
'from' => '+1XXXXXXXXXX',
'body' => "Hey Jenny! Good luck on the bar exam!"
)
);
?>
Wenn ich versuche, eine Nachricht auf mein Handy zu senden, wenn alle korrekten Kontoinformationen heißt es http500 Fehler ich, wenn die Bibliothek getestet arbeitet (ja es ist) und ich weiß es vermasselt wegen dem $ client-> messages-> create aber kann nicht verstehen warum.Http 500 Fehler Nachricht mit PHP54 und Twilio Senden
Können Sie die genaue Fehlermeldung, die Sie erhalten, bitte posten? – philnash
Willkommen bei Stack Overflow Mandep! Sind Sie sicher, dass Twilio tatsächlich auf Ihren Server zugreifen kann? https://www.twilio.com/blog/2015/09/6-awesome-reasons-to-use-grok-when-testing-webhooks.html –