title: Favicon to PNG in PHP
body: <p>I need a PHP script to convert favicons to PNGs while keeping their original dimensions.</p>
  
  <p>I know Google has it's secret icon converter - <a href="http://www.google.com/s2/favicons?domain=http://facebook.com/" rel="noreferrer">http://www.google.com/s2/favicons?domain=http://facebook.com/</a> but this converts favicons to 16x16 even if they they were originally larger. So basically I need this, minus the shrinking effect.</p>
  
  <p>I've also seen this - <a href="http://www.controlstyle.com/articles/programming/text/php-favicon/" rel="noreferrer">http://www.controlstyle.com/articles/programming/text/php-favicon/</a> but I couldn't get it to work after hours of messing around with it.</p>
  
  <p>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.</p>
  
  <p>Does anybody know of a script/service or have a suggestion? Thanks!</p>