search

Home  >  Q&A  >  body text

php - How to save URL image address

https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEc8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyZFdXc1pTdlBiNi0xMDAwME0wM0UAAgQHHe5YAwQAAAAA

How to save the QR code image of this kind of network address locally.

伊谢尔伦伊谢尔伦2791 days ago615

reply all(3)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 13:17:37

    file_put_contents('/tmp/qrcode.png', file_get_contents('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEc8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyZFdXc1pTdlBiNi0xMDAwME0wM0UAAgQHHe5YAwQAAAAA'));

    Is that so?

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 13:17:37

    Wouldn’t it be solved by taking a screenshot? . .

    In addition, just right-click and save as, change the suffix name and you can open it

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:17:37

    This is a QR code with ticket parameters generated by the WeChat public account, that is, different QR code images can be requested through different generated tickets, https://mp.weixin.qq.com/cgi-...this It is the request address, so when you save, you only need to save the ticket, and then when needed, request and display the image resources by splicing the request address.

    reply
    0
  • Cancelreply