I'm using Twilio api in php with native library and I tried many solutions from stackoverflow or from their official website but none of them is working. please think before marking it as already answered. I'm providing some proofs that its really not working. please help if I'm missing some headers etc. because i tried official solution and it doesn't work.
$sid="xxxxxxxxxxx";
$token="xyxxxcxc";
$client=new Client($sid, $token);
function Send_Message($client, $msg, $to){
return $client->messages->create(
$to,
array('from' => '+12566661887',
'body'=>$msg
)
);
}