title: How can I download multiple images from URL using PHP and save them on my folder?
body: <p>I want to get images from different URL and save them on my current folder, so I cant get them later, here is my code :
  in my #upload.html I made this :</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;div&gt;
  &lt;form method="post" action="upload_image.php"&gt;
  &lt;input type="text" name="img_url" placeholder="Enter Image URL"&gt;
  &lt;input type="submit" name="get_image" value="Submit"&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and in my #upload_image.php I made this following code: </p>
  
  <pre><code>&lt;?php
  if(isset($_POST['get_image']))
  {
  $url=$_POST['img_url'];
  $data = file_get_contents($url);
  $new = 'new_image.jpg';
  file_put_contents($new, $data);
  echo "&lt;img src='new_image.jpg'&gt;"; } ?&gt;
  </code></pre>
  
  <p>And by the way guys its my first time here, thanks for answering</p>