How does ios-PHP simulate Android devices and request API data?

Source: Internet
Author: User
How does PHP simulate a large amount of data when the Android device obtains a packet capture request for an API? CustomerId: 801 clientAgent: M351 #1080*1800 versionId: 5.6.2model: GenericAnyPhonecontentformat: json2userId: 412B46585B... how does PHP simulate a large amount of data when the Android device obtains a packet capture request for an API?
CustomerId: 801
ClientAgent: M351 #1080*1800
VersionId: 5.6.2
Model: Generic/AnyPhone
Contentformat: json2
UserId: 412b45085b10a8b8a8aac6e7f92b8811
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

Reply content:

How does PHP simulate a large amount of data when the Android device obtains a packet capture request for an API?
CustomerId: 801
ClientAgent: M351 #1080*1800
VersionId: 5.6.2
Model: Generic/AnyPhone
Contentformat: json2
UserId: 412b45085b10a8b8a8aac6e7f92b8811
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

During simulation, these parameters are included in the header information.

Today, I saw a php httpclient, which is easy to use and recommended.
Http://unirest.io/php.html

Set ua with curl to make the post header the same

There are many ways to do this: Check whether your POST request is a GET request. CURL extension can be implemented !!!

You can use the chrome plug-in postman to debug API interfaces conveniently.

Postman can add multiple types of information including the header information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.