を使用してメッセージを送信しようとしたときにtwilioは、2時間のためにそれで働いて使用することはまだここ致命的なエラーtwilio
Fatal error: Uncaught exception 'Twilio\Exceptions\RestException' with message '[HTTP 400] Unable to create record' in /membri/deathcrow/server/sms/twilio-php-master/Twilio/Version.php:87 Stack trace: #0 /membri/deathcrow/server/sms/twilio-php-master/Twilio/Version.php(207): Twilio\Version->exception(Object(Twilio\Http\Response), 'Unable to creat...') #1 /membri/deathcrow/server/sms/twilio-php-master/Twilio/Rest/Api/V2010/Account/MessageList.php(63): Twilio\Version->create('POST', '/Accounts/ACa81...', Array, Array) #2 /membri/deathcrow/server/sms/que.php(25): Twilio\Rest\Api\V2010\Account\MessageList->create(Array) #3 {main} thrown in /membri/deathcrow/server/sms/twilio-php-master/Twilio/Version.php on line 87
をそれを把握するカントながら、私は、この致命的なエラーを得た私は隠されてきた私の完全なページの符号化ですセキュリティ上の理由から
<?
require_once ("../connect.php");
require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
ignore_user_abort (true);
$sql = "SELECT * FROM smsque ORDER BY id ASC LIMIT 1";
$query = mysql_query ($sql);
$row = mysql_fetch_object ($query);
$id = $row->id;
$msg = $row->message;
$amount = $row->amount;
$reciever = $row->reciever;
$headers = 'From: [email protected]';
// Your Account SID and Auth Token from twilio.com/console
$sid = '******************';
$token = '*************';
$client = new Client($sid, $token);
$client->account->messages->create(array(
"From" => "**********",
"To" => "*******",
"Body" => "Test!"));
//mail ($to, '', $msg, $headers);
$amount--;
if ($amount >= 1){
$sql2 = "UPDATE smsque SET amount='$amount' WHERE id='$id'";
$query2 = mysql_query ($sql2);
}else {
$sql2 = "DELETE from smsque WHERE id='$id'";
$query2 = mysql_query ($sql2);
}
?>