title: Youtube download'er in highest possible format (server side)
body: <p>Welcome,</p>
  
  <p>I'm looking for youtube api what allow me to download youtube video in highest possible format.</p>
  
  <p>Few years ago this job was more simple because url had information about quality like "fmt=22" or "fmt=6" right now we are live in future and that information is embed in player.</p>
  
  <p>Now it's more complex... google use cache servers and get_video doesn't work.</p>
  
  <p>Look for example:
  <a href="http://www.youtube.com/watch?v=XIz-MmKeoCs" rel="nofollow noreferrer">http://www.youtube.com/watch?v=XIz-MmKeoCs</a>
  (it's just example with HD don't comment music)</p>
  
  <p>Right now i'm using old PHPtube class (2007 year).
  phpclasses.org/browse/package/3966.html
  It allow only to download file in lowest quality via flv.</p>
  
  <p>My question is, anyone have class what allow download in highest possible ?</p>
  
  <p>I give video ID -> XIz-MmKeoCs
  It should check what quality is possible for download.
  Right now i don't have any idea how get it...</p>
  
  <p>And give download link. (of course i know about security used by IP, and want download file on my server using file_contents) but i got trouble only with getting that download link.</p>
  
  <p>I will be great for any help...</p>