2014-07-03, 08:08 PM
Embedded Images rely on other hosts and once they get deleted a thread or post become useless there should be an option for admin/moderators to download whole thread's images or selected posts images to local server ...
A practical example can be seen at http://justpaste.it
where embedded images automatically downloaded to local server.....
Any suggestions for such plugin how to start ?
downloading images to local server seems easy but where should I include it in mybb???
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);
}
save_image('http://www.someimagesite.com/img.jpg','image.jpg');
A practical example can be seen at http://justpaste.it
where embedded images automatically downloaded to local server.....
Any suggestions for such plugin how to start ?
downloading images to local server seems easy but where should I include it in mybb???
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);
}
save_image('http://www.someimagesite.com/img.jpg','image.jpg');