php模板消息通知多人简单实例

 $value) {
	$wxid=mysql_fetch_array(mysql_query("select xm2 from t1 where xm1='$value'"));

	$json = '{
		"touser":"'.$wxid[0].'", 
		"template_id":"V83vTzK6rB_slBUlgApPEMtfUVpqq-DEBllg4Ty70Bw",
		"url":"http://www.qq.php?id='.$id.'",
		"topcolor":"#FF0000",
		"data":{
			"first": {
				"value":"",
				"color":"#DC143C"
			},
			"keyword1":{
				"value":"'.$xx.'",
				"color":"#0000ff"
			},
			"keyword2":{
				"value":"点击查看",
				"color":"#0000ff"
			},

			"remark":{
				"value":"",
				"color":"#173177"
			}
		}
	}';


	if ($id!="") {
		curlGet($url,'post',$json);
	}
}
?>

你可能感兴趣的:(php)