Posted By

phpdev on 02/13/13


url php image script favicon snippet Website

Versions (?)

Get the Favicon from a website

 / Published in: PHP

Example of use:

<a href=""><img src="<?php echo get_favicon('') ?>" alt="Favicon" title="See PHP documentation" width="16" height="16" /></a>

Report this snippet  


RSS Icon Subscribe to comments
Posted By: bellmyer on January 26, 2015

I'd recommend using instead of google's S2 favicon service. Google's service was never meant to be public, and could go away at any time. Grabicon was built to be a drop-in replacement - it's also free, and it works the same way.

It also lets you specify what size you want the icon to be, and generates unique default icons for sites that don't have one. This ensures a uniform user experience for web/mobile apps, because icons are always the requested size, and never missing.


You need to login to post a comment.