打算自己写程序并通过api定时生成静态内容。
1. 抓包生成静态内容页面得到访问方式是get,请求网址是:
GET /admin666.php?s=chtml&c=html&m=show_index&app=news&pagesize=5&id_form=580&id_to=589&date_form=&date_to= HTTP/1.1

2. 构建api访问网址是:
https://666.com/index.php?appid=1&appsecret=666&s=chtml&c=html&m=show_index&app=news&pagesize=5&id_form=580&id_to=589&date_form=&date_to=
测试在get请求时没添加协议头,返回的数据为空。
3. 按照教程任意页面查询API接口能正常获取数据 https://www.xunruicms.com/doc/409.html
所以这个生成静态的功能不能通过api实现吗?
// 用于发布成功后生成静态文件代码 //dr_html_auth($_SERVER['SERVER_ADDR']); $atcode = 'chtml_'.SITE_ID.'_模块目录_'.内容id; \Phpcmf\Service::L('cache')->set_auth_data($atcode, 内容id, SITE_ID); dr_catcher_data(SITE_URL.'index.php?s=模块目录&c=html&m=showfile&id=内容id&atcode='.$atcode);