Return to Snippet

Revision: 63580
at May 18, 2013 10:49 by nshakin


Initial Code
<?php
function save_image($inPath,$outPath)
{ //Download images from remote server
    $in=    fopen($inPath, "rb");
    $out=   fopen($outPath, "wb");
    while ($chunk = fread($in,8192))
    {
        fwrite($out, $chunk, 8192);
    }
    fclose($in);
    fclose($out);
}
?>

Initial URL

                                

Initial Description
PHP function to save an image from a remote source then download it to the local server that the script is on.

Initial Title
Copy Image From Remote Server To Local

Initial Tags
php

Initial Language
PHP