我使用下面Twilio API發送短信,我已審閱代碼 它正在其他OS.I罰款也查看以下鏈接棧 Twilio PHP - SSL certificate: self signed certificate in certificate chain不幸的是 Windows系統和我使用Ubuntu的。如何在Ubuntu解決SSL證書錯誤
用於發送SMS的API。
require_once('twilo/Services/Twilio.php');
$number='+91xxxxxxx';
$code='abc';
$sid = "xxxxxxxxxxxxxxxx"; // Your Account SID from www.twilio.com/user/account
$token = "xxxxxxxxxxxxxxxx"; // Your Auth Token from www.twilio.com/user/account
$client = new Services_Twilio($sid, $token);
$message = $client->account->messages->sendMessage(
'+1 xxx-xxx-xxxx', // From a valid Twilio number
$number, // Text this number
$code
);
echo $message->sid;
但是當我使用這個在Ubuntu它給了我下面的錯誤:
Uncaught exception 'Services_Twilio_TinyHttpException' with message 'SSL certificate problem: self signed certificate in certificate chain.
[Twilio PHP - SSL證書:證書鏈中的自簽名證書]的可能副本(http://stackoverflow.com/questions/29153819/twilio-php-ssl-certificate-self-signed-certificate-in-certificate鏈) – Dezza
嗨上面的鏈接是給出的Windows系統,我使用Ubuntu的,所以有沒有其他辦法來解決這個問題。 –