title: save an image from a URL then save it into a directory php
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/724391/save-image-from-php-url-using-php">save image from php url using php</a>  </p>
  </blockquote>
  
  
  
  <p>How can i use php to save/grab an image from another domain(not on  my domain/server) and save it in a directory of my site.</p>
  
  <p>The URL of the image for example , will be :</p>
  
  <pre><code>http://anothersite/images/goods.jpg
  </code></pre>
  
  <p>How can i use PHP to grab "good.jpg" ,and save it in my directory which is <code>www.mysite.com/directory/</code></p>
  
  <p>I hope someone could guide me.
  Thanks!</p>