php - Can communication software capture web page information when transmitting URLs?
巴扎黑
巴扎黑 2017-06-12 09:21:43
0
1
644

Suppose you throw the website URL into communication software such as wechat or line....etc., can you capture the webpage information? For example, if I lose tinder.com, he can capture the icon... How to do this?

Screen Shot 2017-06-10 at 10.23.49 PM.png

巴扎黑
巴扎黑

reply all(1)
typecho

Two plans

  1. Client test implementation, the client can initiate a background call to access the favicon of this website. If the favicon file does not exist, you can also try to initiate another request in the background to access its web page and look at the meta information of the web page. Is there a definition of favicon? If it exists, download it

  2. Server-side implementation, the principle is no different from client-side implementation, except that the behavior is placed on the server side. The client requests the server to try to see if there is a favicon with this address in the cache. If it does not exist, the server can try to obtain it once, and Save the results

For the situation where the icon is not a favicon, please refer to:
http://www.kylejlarson.com/bl...


If you are more concerned about how to implement it on the website side, I checked it and found that there is actually a standard protocol:
Please refer to: http://ogp.me/

From: https://flniu.github.io/blog/...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template