/ Published in: PHP
                    
                                        
A simple function to grab the favicon of a domain using Google s2 Converter. I kept it simple just so it could be changed easily work in a number of different situations.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php
// Grab the favicon of a domain using Google s2 Converter
// Put this in your php file and then call it like:
// http://yourdomain.com/file.php?url=somedomain.com
function getFavicon(){
$linkurl = $_GET['url'];
$imgurl = "http://www.google.com/s2/favicons?domain=" . $linkurl;
echo '<img src="' . $imgurl . '" width="16" height="16" />';
}
getFavicon();
?>
URL: http://snipplr.com/view/8120/google-favicon/
Comments
 Subscribe to comments
                    Subscribe to comments
                
                