i am using
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);
}
This function working perfectly , but if i open the image it show file is empty.
i also tried file_get_content() function .But still having the same problem.
I always prefer to use curl to do this kind of thing.
If you don’t have curl installed check the official PHP curl installation instructions, installing curl of Windows is pretty easy.