|
 |
|
ใครพอจะทราบวิธี นำค่าจากฐานข้อมูลมากสร้างเป็นรูปภาพบ้างครับ |
|
 |
|
|
 |
 |
|
$db = "Test,Arial,ffffff";
list($text, $font, $color) = explode("," , $db);
//วิธีแปลง html color to rgb อยู่นี่ http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml
header('Content-type: image/gif');
$image = imagecreatetruecolor(150, 20);
$background = imagecolorallocate($image, 255, 255, 255);
$textcolor = imagecolorallocate($image, 0, 0, 0);
imagefilledrectangle($image, 0, 0, 150, 20, $background);
imagettftext($image, 10, 0, 5, 12, $textcolor, $font, $text);
imagegif($image);
imagedestroy($image);
ลองดูถ้ามี error บอกนะ ไม่ได้เทส
|
 |
 |
 |
 |
Date :
2009-02-20 21:45:17 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|