请有人向我解释如何转换此代码以使用可在 GitHub (twilio-php-5.0.0-RC7) 上下载的新 Twilio PHP API 版本?
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('twilio/Services/Twilio.php'); // Loads the library
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "";
$token = "";
$client = new Services_Twilio($sid, $token);
$messages = $client->account->messages->getIterator(0, 50, array(
'To' => $_SERVER['QUERY_STRING']
));
foreach ($messages as $message) {
echo "<tr><td class=\"text-center\">" . $message->from . "</td><td class=\"text-center\">" . $message->date_sent . "</td><td class=\"text-center\">" . $message->body . "</td></tr>";
}
?>
不再有twilio/Services/Twilio.php
要包含的文件,而且我看不到任何类似名称的东西,而且据我所知,文档似乎没有更新为与上述类似的示例。