title: download image from wamp server and save in my folder loacated in same using php
body: <p>hello friends i want to save image from my wamp server to my specific wamp project folder  i have used below code ,this code show me the dialog to save image but i want to call image from wamp server and save it in my folder </p>
  
  <pre><code>&lt;?php 
      header('Content-type: image/png');
      $imageUrl = "http://ip/demo/images/itemimage/Platters.png";
      $filename = realpath(dirname("http://ip/demo/images/itemimage/Platters.png"))."/image1.png";
      $handle = file_get_contents($imageUrl); 
      file_put_contents($filename, $handle);
  
  ?&gt;
  </code></pre>
  
  <p>this code do not download image automatically to my folde can any one help me ?
  i got ths error  with above code</p>
  
  <p><img src="https://i.stack.imgur.com/HCXcj.png" alt="enter image description here"></p>