How to get a website's favicon with PHP?

后端 未结 13 1139
醉梦人生
醉梦人生 2020-12-02 16:08

I want to get, requested website\'s favicon with PHP. I have been recommended using Google\'s favicon service but it is not functional. I want to do something on my own but

13条回答
  •  一个人的身影
    2020-12-02 16:40

    Use the S2 service provided by google. It is as simple as this

    http://www.google.com/s2/favicons?domain=www.yourdomain.com
    

    Scraping this would be much easier, that trying to do it yourself.

提交回复
热议问题