<?php
/**
 * Project:        M.VuiZ.Net
 * Author:         nampt.me <admin@vuiz.net>
 * Copyright:      © 2025 vuiz.net All rights reserved.
 */
//Support: Gocpho.Biz
header('Content-Type: image/png');
header('Content-disposition: attachment;filename="logo.png"');
//gia tri
$size= 20;
$angel= 0; 
$kc = empty($_GET['kc']) ? 2 : $_GET['kc'];
$text1 = empty($_GET['text1']) ? 'VuiZ' : $_GET['text1'];
$text15 = strlen($text1);
$text2 = empty($_GET['text2']) ? 'VuiZ.Net' : $_GET['text2'];
$text = $text1.''.$text2;
$font= __DIR__.'/fawn.ttf';
$cao= 38;
$bbox= imagettfbbox($size,$angel,$font,$text);
$rong= $bbox[2] + 55;
//tao anh moi
$im = imagecreatetruecolor($rong,$cao);
$bird = imagecreatefrompng('icon.png');
//dinh dang mau sac
$white = imagecolorallocate($im,255,255,255);
$red= imagecolorallocate($im,255,0,0);
$trans = imagecolorallocatealpha($im,255,255,255,127);
$xanh = imagecolorallocate($im,35,
104,
61);
imagealphablending($im, FALSE);
imagesavealpha($im,TRUE);
//in van ban
$vt = 48 + ($text15*10)+$kc;

imagefilledrectangle($im,0,0,$rong,$cao,$trans);
imagecopy($im,$bird,1,4,0,0,imagesx($bird),imagesy($bird));
imagettftext($im,$size,$angel,48,35,$red,$font,$text1);
imagettftext($im,$size,$angel,$vt,35,$xanh,$font,$text2);
 
 
 
//Xuat and pha huy
imagepng($im);
imagedestroy($im);
?>