title: Is it possible to Copy images from web to your Hard Drive?
body: <p>I am trying to create a page for just personal use. What I want to do is, create a system through which I can download images to my local hard disk, directly by providing the link through a <strong>localhost</strong> like WAMP. The reason I am trying to do is, I want the images to be automatically sorted onto my hard disk. My form field will be something like this</p>
  
  <pre><code>&lt;form method="POST" action="process.php"&gt;
     &lt;input type="text" name="URL" id="URL" /&gt;
     &lt;input type="text" name="category" id="category" /&gt;
     &lt;input type="text" name="subcategory" id="category" /&gt;
     &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now, in the <code>process.php</code></p>
  
  <pre><code>//This is just a sample... So please ignore the roughness of the coding
  
  copy($_POST['url'],$_POST['category']."/".$_POST['subcategory']."/somename.jpg");
  
  // If you noticed, the categories and subcategories are actually the name of directory, where I want the picture to go be saved....
  </code></pre>
  
  <p>I am thinking my approach is wrong. How can I achieve something like this?</p>
  
  <h2>Error</h2>
  
  <pre><code>Warning: copy(images/image.jpg) [function.copy]: failed to open stream: No such file or directory in
  </code></pre>