抓包获取的安卓设备请求API时候携带了这么一大堆数据,PHP如何模拟这些数据?
customerId: 801
clientAgent: M351#1080*1800
versionId: 5.6.2
model: Generic/AnyPhone
contentformat: json2
userId: 412B46585B10A8B8A8AAC6E7F92B8811
Token: 7531756a785967676c4a6371664b33767531452b356b506e
agency: MeizuStore01
clientTest: false
Content-Length: 609
Content-Type: application/x-www-form-urlencoded
Host: mobds.ganji.cn
Connection: Keep-Alive
User-Agent: Paros/3.2.13
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
用curl设置ua,把post头部弄一样
方法多得是,看你的POST请求还是GET请求,CURL扩展可以实现!!!
可以用postman这个chrome插件,调试API接口很方便。
postman 可以添加多种类型的信息 包含这些头信息