您好已在谷歌日历上设置观看
$channelID = "my-caledar-". date('His', time());
$channel->setId($channelID);
$channel->setType('web_hook');
$channel->setAddress('xxxxx');
并在调用此方法后获取有效参数
当我在日历上创建/删除任何事件时,我在推送通知网址
上显示为空if($_POST){
$msg = json_encode($_POST);
pg_query($pg_conn, "INSERT INTO postdata(post_data) values ('$msg')");
} else {
$result = pg_query($pg_conn, "SELECT * FROM postdata;");
}
$结果变空
答案 0 :(得分:1)
通知
$msg = json_encode(array('HTTP_X_GOOG_CHANNEL_ID' => $_SERVER['HTTP_X_GOOG_CHANNEL_ID'],
'HTTP_X_GOOG_CHANNEL_EXPIRATION' => $_SERVER['HTTP_X_GOOG_CHANNEL_EXPIRATION'],
'HTTP_X_GOOG_RESOURCE_STATE' => $_SERVER['HTTP_X_GOOG_RESOURCE_STATE'],
'HTTP_X_GOOG_MESSAGE_NUMBER' => $_SERVER['HTTP_X_GOOG_MESSAGE_NUMBER'],
'HTTP_X_GOOG_RESOURCE_ID' => $_SERVER['HTTP_X_GOOG_RESOURCE_ID'],
'HTTP_X_GOOG_RESOURCE_URI' => $_SERVER['HTTP_X_GOOG_RESOURCE_URI']
));