title: Find all my videos and delete them youtube api
body: <p>I am using PHP Curl to upload videos and it works great.
  I keep getting this when i try to delete a video:</p>
  
  <p>Http method DELETE is not supported by this URL - Error 405</p>
  
  <pre><code>$headers = array("Authorization: GoogleLogin auth=".$authvalue,
               "GData-Version: 2",
               "Content-Type: application/atom+xml; charset=UTF-8",
               "DELETE /feeds/api/users/".$username."/uploads/".$videoid." HTTP/1.1");
  
  $curl = curl_init("http://gdata.youtube.com");
  curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_TIMEOUT, 10);
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($curl, CURLOPT_POST, 0);
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
  curl_setopt($curl, CURLOPT_REFERER, true);
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($curl, CURLOPT_HEADER, 0);
   $b = curl_exec($curl);    
  </code></pre>