title: How cURL works with file
body: <p>I have a problem I have to access an URL <code>cURL</code> only I get the message:</p>
  
  <blockquote>
    <p>404 Not Found</p>
  </blockquote>
  
  <hr>
  
  <p>whereas when I write folowing command it works. I do not understand, </p>
  
  <pre><code>curl "http://stream.song365.co/h/2747175/Arctic%20Monkeys%20-%20R%20U%20Mine%3F_(song365.cc).mp3"
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'http://stream.song365.co/h/2747175/Arctic%20Monkeys%20-%20R%20U%20Mine%3F_(song365.cc).mp3');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_REFERER,'https://www.song365.co/');
  $output = curl_exec($ch);
  curl_close($ch);
  return $output;
  </code></pre>