Google-Favicon-API is a project mainly written in PHP, it's free.
PHP function to pull a website Favicon using PHP, CURL, and Google's API
Quick PHP function that uses Google's API to pull websites Favicons. The API dynamically converts the image into a PNG format.