title: how to get image from url in php?
body: <p>I have one remote url which outputs the image
  The url is in format like this</p>
  
  <pre><code>http://domain.com/my_file/view/&lt;file_id&gt;/FULL/
  </code></pre>
  
  <p>In the url "my_file" is a controller name, "view" is a function name and the other two are the parameters</p>
  
  <p>If I hit this url in browser it shows me image</p>
  
  <p>I want to take that image in my projects folder</p>
  
  <p>I have tried with file_get_contents but it gives me warning with 404</p>
  
  <p>How can I achieve that?</p>