php http request problem

WBOY
Release: 2023-03-03 08:52:02
Original
1594 people have browsed it

Request instructions
HTTP GET request (please use https protocol) https://mp.weixin.qq.com/cgi-... Reminder: Remember to perform UrlEncode on TICKET
Return instructions
If the ticket is correct, the http return code is 200 , is a picture that can be displayed or downloaded directly.
HTTP header (example) is as follows:
Accept-Ranges:bytes
Cache-control:max-age=604800
Connection:keep-alive
Content-Length:28026
Content-Type:image/jpg
Date:Wed, 16 Oct 2013 06:37:10 GMT
Expires:Wed, 23 Oct 2013 14:37:10 +0800
Server:nginx/1.4.1
In case of error (such as illegal ticket), HTTP error code 404 is returned.

How to get this picture? ?

Reply content:

Request instructions
HTTP GET request (please use https protocol) https://mp.weixin.qq.com/cgi-... Reminder: Remember to perform UrlEncode on TICKET
Return instructions
If the ticket is correct, the http return code is 200 , is a picture that can be displayed or downloaded directly.
HTTP header (example) is as follows:
Accept-Ranges:bytes
Cache-control:max-age=604800
Connection:keep-alive
Content-Length:28026
Content-Type:image/jpg
Date:Wed, 16 Oct 2013 06:37:10 GMT
Expires:Wed, 23 Oct 2013 14:37:10 +0800
Server:nginx/1.4.1
In case of error (such as illegal ticket), HTTP error code 404 is returned.

How to get this picture? ?

Can I get the QR code via WeChat? Just splice the ticket behind the url and access it

In fact, if you access it directly, the body obtained is the content of the image. Then just dump it into Content-Type format.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!