<?php
/**
 * Project:        M.VuiZ.Net
 * Author:         nampt.me <admin@vuiz.net>
 * Copyright:      © 2025 vuiz.net All rights reserved.
 */
header('Content-Type: image/png');
header('Content-disposition: attachment;filename="logo.png"');
$text = empty($_GET['text']) ? 'VuiZ.Net' : $_GET['text'];
$size = empty($_GET['size']) ? 60 : $_GET['size'];
 

function get($url, $data){
	$curl = curl_init($url);
	curl_setopt($curl, CURLOPT_URL, $url);
	curl_setopt($curl, CURLOPT_POST, true);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	$headers = array(
		"Content-Type: application/x-www-form-urlencoded",
	);
	curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
	$data = http_build_query($data);
	curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($curl);
	curl_close($curl);
	return $result;
}
$url = 'https://fontmeme.com/loadmeAlt_21.php';
$sent = array('id'=>7583,'name'=>'Saiyan-Sans.ttf','text'=>$text,'size'=>$size,'style_color'=>'#FF9800','style_effect'=>'Style-ConcaveT');
$path = trim(get($url,$sent));
//$path = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'.$path;

/*
$files = 'down/'.basename($path).'.png';
copy($path,$files);
*/
$img = imagecreatefrompng($path);
$size= getimagesize($path);
$w=$size[0]; //rong
$h=$size[1];//cao


$y = $h+28;
$icon = imagecreatefrompng('goku.png');
$icon2 = imagecreatefrompng('vados.png');
$icon3 = imagecreatefrompng('speedy.png');
$im  = imagecreatetruecolor($w+165,84);
$mau = imagecolorallocate($im,213,38,50);
imagealphablending($im,false);
imagesavealpha($im,true);
$transparent = imagecolorallocatealpha($im, 255, 255, 255, 127);
imagefilledrectangle($im, 0, 0, $w+165,84, $transparent);


imagecopy($im,$icon,0,0,0,0,imagesx($icon),imagesy($icon));
imagecopy($im,$icon2,$w+84,0,0,0,imagesx($icon2),imagesy($icon2));
imagecopy($im,$img,84,0,0,0,$w,$h);

$vt = ($w+165-20)/2;
imagecopy($im,$icon3,$vt,0,0,0,imagesx($icon3),imagesy($icon3));
imagepng($im);
imagedestroy($im);
?>