我想获取图像的大小,但是我有一个警告问题,我有此代码
$html = file_get_contents('https://www.google.com');
$dom = new domDocument;
@$dom->loadHTML($html);
$dom->preserveWhiteSpace = false;
$images = $dom->getElementsByTagName('img');
foreach ($images as $image) {
$file= $image->getAttribute('src');
echo filesize($file);
}***