title: fetch all youtube videos using curl
body: <p>I'm a beginner at PHP.  I have one task in my project, which is to fetch all videos from a YouTube link using curl in PHP.  Is it possible to show all videos from YouTube?</p>
  
  <p>I found this code with a Google search:</p>
  
  <pre><code>&lt;?php
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://www.youtube.com');
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $contents = curl_exec ($ch);
   echo $contents;
   curl_close ($ch);
  ?&gt;
  </code></pre>
  
  <p>It shows the YouTube site, but when I click any video it will not play.</p>