Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to detect favicon (shortcut icon) for any site via php?

how to detect favicon (shortcut icon) for any site via php ?

i cant write regexp because is different in sites..

like image 722
Abudayah Avatar asked Apr 26 '11 12:04

Abudayah


People also ask

How do I inspect the favicon icon?

In the address bar, enter chrome://favicon/ , followed by the url.

What is a shortcut favicon image?

A favicon (/ˈfæv. ɪˌkɒn/; short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a file containing one or more small icons, associated with a particular website or web page.

Do all websites have a favicon displayed in the URL?

Nowadays, favicons are displayed right above the address bar regardless of whether the website is bookmarked or not. And in the small chance that a website doesn't have a favicon, the browser will display a generic browser symbol. 2. In addition to the address bar, favicons can also be found in the browser history.


1 Answers

You could use this address and drop this into a regexp

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

This addresses the problem you were having with Regexp and the different results per domain

like image 143
Dan Hanly Avatar answered Oct 14 '22 21:10

Dan Hanly