function screen($url, $width, $height, $widthImg)
{
$screen="http://mini.s-shot.ru/".$width."x".$height."/JPEG/".$widthImg."/Z100/?".$url;
$screen=file_get_contents($screen);
$name = sha1(md5($url.date('H:i:s')));
$newFile = "screens/".$name."-".$widthImg.".jpg";
file_put_contents($newFile, $screen);
$file = $newFile;
return $file;
}
echo screen("https://toster.ru/", "1920", "1080", "1920");