开发者

grab favicon from websites on failure use a local one [closed]

It's difficult to tell what is being asked here. This question is ambiguous, 开发者_Go百科vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I want php code for grabbing favicons from different websites and resizing it and saving it in a directory. The code should first check if the favicon exists for a domain already and if it doesnt then it should grab it and save it and then display it, else display it straight away.

Thanking in advance.


Look into using curl or file_get_contents().

You will need to try and get the favicon using one of these methods, I suggest curl. Then determine if the response was a 404 not found, if it wasn't download the icon, store and resize.

Without more code or even an attempt at the solution it's hard to add anything else of worth.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜