<?php 
	$access_token = 'quLRcbOewV7tSfcsVr/g42URrBnTsFQtEuTwhZYhudPfUbWs/mFYa8r/g4H6OvUe5zzJOK7ef6CFLdl4/H6MdQg1itZ/vnn/pv4x5k08gAg+kZPRlA2tWysrTagQWbbUcfmSmwYA22qXJV84ewe4hAdB04t89/1O/w1cDnyilFU=';
	$url = 'https://api.line.me/v2/bot/message/push/';
	$messages = [
		'type' => 'text',
		'text' => 'ระบบโดเมนพบปัญหา http://zabbix.ezmember.org/zabbix/zabbix.php?action=dashboard.view '
	];
	

	$data = [
		// it news C540ff359b53c5d9f644878383374df71
		// EM comเสีย C5d15aa0daa30127668a1ffd83ae54052
		//อ้น Uaa959e7278d7845542264c3e21511355
		// 'to' => 'Cedbd0d3fa8e61076328d65a1ccd6026f',
        'to' => 'C540ff359b53c5d9f644878383374df71',
		'messages' => [$messages],
	];
	$post = json_encode($data);
	$headers = array('Content-Type: application/json', 'Authorization: Bearer ' . $access_token);

	$ch = curl_init($url);
	curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($ch);
	echo curl_error($ch);
	echo $result . "\r\n";
	curl_close($ch);
?>