title: PHP cURL programming
body: <p>I want to perform a cURL command which i can get youtubes Url of videos in an array printed.
  I can't make it work any suggestions please </p>
  
  <pre><code>&lt;?php
  $curl = curl_init(); 
  $search_string = "programming knowledge";
  $url = "https://www.youtube.com/results?search_query=$search_string";
  
  curl_setopt($curl, CURLOPT_URL, $url);
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  
  $result = curl_exec($curl);
  
  preg_match_all("!https://[^\s]*?.com/!",$result,$matches);
  
  print_r($matches);
  curl_close($curl);
  </code></pre>