title: Fetch YouTube highest thumbnail resolution
body: <p>I want to get youtube highest thumbnail "maxresdefault.jpg"</p>
  
  <p>Like this one</p>
  
  <p><a href="http://i.ytimg.com/vi/Cj6ho1-G6tw/maxresdefault.jpg">http://i.ytimg.com/vi/Cj6ho1-G6tw/maxresdefault.jpg</a></p>
  
  <p>I'm using this simple php code</p>
  
  <pre><code>&lt;?php
  
  $youtub_id = "Cj6ho1-G6tw";
  echo "http://i.ytimg.com/vi/".$youtub_id."/maxresdefault.jpg";
  
  ?&gt;
  </code></pre>
  
  <p>The problem with the code above is there is videos like this one <a href="http://youtu.be/VGazSZUYyf4">http://youtu.be/VGazSZUYyf4</a> <strong>NOT HD</strong></p>
  
  <p>And the result is gray small 404 image of youtube</p>
  
  <p><a href="http://i.ytimg.com/vi/VGazSZUYyf4/maxresdefault.jpg">http://i.ytimg.com/vi/VGazSZUYyf4/maxresdefault.jpg</a></p>
  
  <p>So how to get the highest youtube thumbnail so if "maxresdefault" not available get the next big thumbnail "hqdefault", if not get the next "mqdefault" etc ...</p>
  
  <p><strong>I tried to use <a href="http://gdata.youtube.com/feeds/api/videos/Cj6ho1-G6tw?v=2&amp;prettyprint=true">gdata youtube</a> but either way the video hd or not "maxresdefault" not showing.</strong></p>