You can try below code
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://accbd.com/api/send_req');
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type' => 'application/json'));
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_USERPWD, "myusername:mypassword");
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, '{"text":"Hello, #param#.","port":[2],"param":[{"number":"123456","text_param ":["John"],"user_id":1}]}');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec($curl);
curl_close($curl);
echo $data;exit;