在WAP站点用GD(1.8版以上)生成WBMP
发表于:2007-07-01来源:作者:点击数:
标签:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="start" title="Rectangle">
<p align="center">
<img src="rectangle.
php" alt="Rectangle"/>
</p>
</card>
</wml>
rectangle.php
<?
Header("Content-type: image/vnd.wap.wbmp");
$im = imagecreate(90, 90);
$white = ImageColorAllocate($im, 255,255,255);
$black = ImageColorAllocate($im, 0,0,0);
ImageRectangle($im, 5, 5, 85, 85, $black);
ImageWBMP($im);
ImageDestroy($im);
?>
原文转自:http://www.ltesting.net