mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
19 lines
351 B
PHP
Executable File
19 lines
351 B
PHP
Executable File
<?php
|
|
|
|
$url = file_get_contents("https://img.youtube.com/vi/".$_POST['id']."/mqdefault.jpg");
|
|
|
|
$image = new Imagick();
|
|
$image->readImageBlob($url);
|
|
|
|
|
|
$image->blurImage(30,50);
|
|
|
|
$output = $image->getimageblob();
|
|
|
|
$image->setImageFormat("jpeg");
|
|
|
|
file_put_contents ("../images/thumbnails/".$_POST['id'].".jpg", $image);
|
|
|
|
echo base64_encode($output);
|
|
?>
|