Home > Article > Backend Development > php http request problem
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.
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.
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.