PHP如何模拟安卓设备,请求API接口的数据
抓包获取的安卓设备请求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
传说中的q
10 years, 2 months ago
Answers
模拟的时候,在头信息中携带这些参数。
今天正好看到一个php httpclient,感觉比较好用,推荐下。
http://unirest.io/php.html
ljj3388
answered 10 years, 2 months ago