<?php
$files = [
    'CanonPixmaE510.webp', 'epsonpaderror.webp', 'epson-pm.webp',
    'BrotherMFC-L2700DW.webp', 'CLJ4700-CP4005ITBreset1.webp', 'CLJ4700-CP4005ITBreset.webp'
];
$dir = __DIR__ . '/../public/assets/images/';
foreach ($files as $f) {
    $url = 'https://printerservis.net/images/' . $f;
    echo "Downloading: $url\n";
    $data = @file_get_contents($url, false, stream_context_create(['http' => ['timeout' => 5]]));
    if ($data) {
        file_put_contents($dir . $f, $data);
        echo "  OK: " . strlen($data) . " bytes\n";
    } else {
        echo "  FAILED\n";
    }
}
echo "Done.\n";
