/ Published in: PHP
URL: http://snipplr.com/view/8120/google-favicon/
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
<?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; } getFavicon(); ?>
Comments
Subscribe to comments
You need to login to post a comment.

You can keap the original URL without removing the protocol with the "domainurl" parameter : http://www.google.com/s2/u/0/favicons?domainurl=http://www.google.com