How does PHP get the address of a picture on a remote website? Do you have any ideas?

Source: Internet
Author: User
How does PHP get the address of a picture on a remote website? Do you have any ideas?
For example, to get Baidu's background image of the path
https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/super/crop%3D229%2C229%2C1770%2C1103/sign= C9810c80b61c8701c2f9e8a61a4dac16/d1a20cf431adcbef91fbcc62a9af2edda2cc9f83.jpg


Reply to discussion (solution)

File_get_contents + preg_match_all?

File_get_contents + preg_match_all?


Not regular, how to match the image jpg it?

https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/super/crop%3D229%2C229%2C1770%2C1103/sign= C9810c80b61c8701c2f9e8a61a4dac16/d1a20cf431adcbef91fbcc62a9af2edda2cc9f83.jpg
That's not it, is it? You know, you can use it to get it.

https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/super/crop%3D229%2C229%2C1770%2C1103/sign= C9810c80b61c8701c2f9e8a61a4dac16/d1a20cf431adcbef91fbcc62a9af2edda2cc9f83.jpg
That's not it, is it? You know, you can use it to get it.


I just give an example of Baidu, to a URL, and then get the picture in this URL

Reference: http://www.jb51.net/article/51715.htm

  • 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.