Saving array of remote images in server
<p>So, I have this code, but didn't worked</p>

<pre><code>&lt;?
foreach($itemlist as $item) {
    $imagepic = $item['mainpictureurl'];
    for($k=0;$k&lt;count($imagepic);$k++){
            echo $imagepic++;
            echo "&lt;br&gt;";
            $isok=copy($imagepic[$k] , $_SERVER . dirname(__FILE__).'/test/item_'.($k+1).'.jpg');
            if($isok==true){
                echo' success!';  
            }else{
                echo ' Fail';  
            }
        }
    }
?&gt;
</code></pre>

<p>I kept on getting this error</p>

<pre><code>Warning: copy(h) [function.copy]: failed to open stream: No such file or directory in /home/decultur/public_html/shop/templatescustom/main/itemlist.html on line 111
Fail
</code></pre>

<p>What am I missing, please tell me</p>
