udah ko' bang..
neeh kode saiia...
[spoiler]<?php
/*
Customized Font Type || By si-andha
Visit
http://si-andha.web44.net
*/
class andhaCostumizedText {
var $font = 'fonts/flashit.ttf';
function andhaCostumizedText($width,$height,$text) {
$font_size = 30;
$image = @imagecreate($width, $height) or die ('Text is missing');
$background_color = imagecolorallocate($image, 255, 255, 255);
$text_color = imagecolorallocate($image, 0, 0, 0);
$textbox = imagettfbbox($font_size, 0, $this->font, $text);
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $text);
imagejpeg($image);
}
}
$width = isset($_GET['width']) ? $_GET['width'] : '';
$height = isset($_GET['height']) ? $_GET['height'] : '';
$text = isset($_GET['text']) ? $_GET['text'] : '';
header('Content-Type:image/jpg');
$andha = new andhaCostumizedText($width,$height,$text);
?>[/spoiler]
ntu saiia taruh di folder utama..
kode ntu n' folder font'a....
Last edited by dj_afran (2008-07-24 08:33:05)