Created
December 18, 2010 21:13
-
-
Save ArnaudBrousseau/746890 to your computer and use it in GitHub Desktop.
Quite handy : getting a 16x16 PNG file given a particular URL - via Google S2 service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_favicon($url){ | |
$url = str_replace("http://",'',$url); | |
//TODO : regex that removes the last part of the url and detects errors | |
return "http://www.google.com/s2/favicons?domain=".$url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment