$postUrl = 'https://hook.bearychat.com/=bwGFg/incoming/70e24a628680e77277fa35be7a11017x';
$curlPost = array("text" => json_encode($branch_data, JSON_UNESCAPED_UNICODE));

$curlPost = json_encode($curlPost);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $postUrl);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);

curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPost);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
	'Content-Type: application/json; charset=utf-8',
	'Content-Length:' . strlen($curlPost),
	'Cache-Control: no-cache',
	'Pragma: no-cache'
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curl);
curl_close($curl);

发表评论

电子邮件地址不会被公开。 必填项已用*标注