title: Generate a url for youtube search
body: <p>How can I use javascript or php to generate a url for youtube, that searches for videos on a specific user account with best title match on top? </p>
  
  <p>I am using this code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
  &lt;/head&gt;
  
  &lt;script type="text/javascript"&gt;
      function mysearch()
      {
          var elem=document.getElementById('inputsearchquery');
          var url="http://www.youtube.com/user/QueenVEVO/videos?query="+encodeURIComponent(elem.value);
          var win=window.open(url, '_blank');
          win.focus();
      }
  &lt;/script&gt;
  
  &lt;body&gt;
      &lt;h2&gt;Enter search string (user: Queen)&lt;/h2&gt;
      &lt;input id="inputsearchquery" type="text" value="the show must go on"&gt;
      &lt;button type="button" onclick="mysearch()"&gt;Search&lt;/button&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The only problem is that youtube does not place the best title match at the top! The video "The show must go on" is on 13th place, and I expected it to be on top?</p>
  
  <p>Can anyone tell me how to change the url so youtube places the best title match on top? Or do I really have to use the youtube api for this task?</p>