Posted By

arnaudbrousseau on 12/19/10


Tagged

favicon


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

zreedeecom
luizlopes
stephen_will
Envo
bennettstone
D4RKCODE


Get favicon with Google


 / Published in: PHP
 

This fonction use Google Favicon Service to get the favicon from an URL. Good to know it exists...

  1. function get_favicon($url){
  2.  
  3. $url = str_replace("http://",'',$url);
  4. //TODO : regex that removes the last part of the url and detects errors
  5. return "http://www.google.com/s2/favicons?domain=".$url;
  6.  
  7. }

Report this snippet  

You need to login to post a comment.