![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
[php]<?PHP
/*
* Edition : V 1.0
* Date : 2006-04-08
* Writes : ClearWind
* Email : li@hn22.net
* Copyright : Have no temporary
*/
// The ysphoto born
// Adjust to use : method echo "";
$validate_mun=$_GET['validate_mun'];
if( ereg("^[0-9]{4,5}$",$validate_mun) )
{
Header("Content-type:image/png");
$img = imagecreate( 50, 17 );
$color_black = ImageColorAllocate ( $img, 0, 0, 0 );
$color_white = ImageColorAllocate ( $img, 255, 255, 255 );
imageline ( $img, 1, 1, 350, 25, $color_black );
imagestring ( $img, 5, 2, 1, $validate_mun, $color_white);
for( $i=0; $i<300; $i++ ) // In the Interference pt.
{
$randcolor = ImageColorallocate( $img, rand(0,255), rand(0,255), rand(0,255) );
imagesetpixel ( $img, rand()%70, rand()%30, $randcolor );
}
ImagePng( $img );
ImageDestroy( $img );
}else{
echo 'The ysphoto adjust to use Method is error.';
}
?>[/php]
不知道以前是哪个哥们的代码了.我一直在用,我在PHP5就不行了.
是什么原因,谁给个提示.

