copy() not working from url to folder in php
<p>I am trying to copy file from a url to a folder in my system using php</p>

<pre><code>&lt;?php $image = "http://l.yimg.com/t/frontpage/10-facts-slideshow-080512-630-01.jpg";
if (!copy($image, "localfolder/mainPic1.png")) {
echo "FAILED";
}else{echo "DONE";}
</code></pre>

<p>it always end up with "Failed"</p>

<ul>
<li><p>All permissions are set to the localfolder</p></li>
<li><p>i checked the phpinfo and found that  <code>allow_url_fopen =Off</code></p></li>
</ul>

<p>as it is a shared server i do not have any control over the php settings . please can you suggest an alternative.</p>

<p>Thanks,
Jay</p>
