I need a PHP script to convert favicons to PNGs while keeping their original dimensions.
I know Google has it's secret icon converter - http://www.google.com/s2/favicons?domain=http://facebook.com/ but this converts favicons to 16x16 even if they they were originally larger. So basically I need this, minus the shrinking effect.
I've also seen this - http://www.controlstyle.com/articles/programming/text/php-favicon/ but I couldn't get it to work after hours of messing around with it.
Basically I am trying to automatically grab the icon for a link that will be as large as possible - automatically 48x48 png based on a URL would be the perfect scenario, but I don't know of any humanly possible way to do this given that no websites happen to keep a 48x48 icon in a publicly accessible spot.
Does anybody know of a script/service or have a suggestion? Thanks!
So I ended up using a class called FloIcon that could convert BMPs to ICO. I should note that it's always important to check the file type of an icon and not assume that .ico means bmp because some sites (like Facebook) were actually PNG).
@goker.cebeci Your service looks awesome! The main thing is that I needed my icons to be the maximum size when possible, so I just wrote my own script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With