Есть код
$image = imagecreatefromjpeg($file);
list($w, $h) = getimagesize($file);
$height_1 = imagettfbbox($size1, 0, 'fonts/arial.ttf', $header);
$height_2 = imagettfbbox($size2, 0,'fonts/arial.ttf', $text);
$width_1 = $height_1[2]-$height_1[0];
$height1 = $height_1[1]-$height_1[7];
$width_2 = $height_2[2]-$height_2[0];
$height2 = $height_2[1]-$height_2[7];
$file_width = $w + 8 + 20 * 2 + 16 * 2;
$file_height = $h + 8 + 20 * 2 + 16 * 2 + $height1 + $height2 + 16 * 3;
$fone = imagecreatetruecolor($file_width, $file_height);
$white = imagecolorallocate($fone, 255, 255, 255);
$black = imagecolorallocate($fone, 0, 0, 0);
imagefill($fone, 0, 0, $black);
imagecopy($fone, $image, 20 + 16 + 4, 20 + 16 + 4, 0, 0, $w, $h);
imagerectangle($fone, 20 + 16 + 4 - 3, 20 + 16 + 4 - 3, 20 + 16 + $w + 4 + 2, 20 + 16 + $h + 4 + 2, $white);
imagerectangle($fone, 20 + 16 + 4 - 4, 20 + 16 + 4 - 4, 20 + 16 + $w + 4 + 3, 20 + 16 + $h + 4 + 3, $white);
imagettftext($fone, $size1, 0, ($file_width - $width_1) / 2, 20 + 16*2 + 8 + $h + $height1 + 16, $white, 'fonts/arial.ttf', $header);
imagettftext($fone, $size2, 0, ($file_width - $width_2) / 2, 20 + 16*2 + 8 + $h + $height1 + $height2 + 16*2, $white, 'fonts/arial.ttf', $text);
$upload_file = 'files/' . time() . '_' . $user_id. '.jpg';
imagejpeg($fone, $upload_file, 98);
imagecolordeallocate($fone, $black);
imagecolordeallocate($fone, $white);
imagedestroy($fone);
Как в него вписать копирайт сайта
$_SERVER['HTTP_HOST']