查看文件: make_vipname_pic.php
大小: 1.51 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php mysql_select_db($database_BE2, $BE2); $query_Rt2 ="SELECT scode, mem_user2 FROM member WHERE mem_user2 <>''"; $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <? do { // strlen word $word1=$row_Rt2['mem_user2']; $flen=mb_strlen($word1); echo $row_Rt2['scode'].','.$word1.','.$flen.'<br>'; if($flen<8){ $im = imagecreate(125,24); $white = ImageColorAllocate($im, 255,255,255); $ix = ImageColorAllocate($im, 0,0,255); $mfont="/www2/skybni/fonts/kaiu.ttf"; $w1=array(0,0,36,30,26,18,9,0,0,0,0,0,0,0,0); $w2=array(0,0,32,22,18,18,18,18,18,18,18,18,18,18,18); $f='/www2/skybni/logo_img/Vip_'.$row_Rt2['scode'].'.png'; imagefill($im,0,0,$white);// $gray$white for ($c=0;$c<$flen;$c++){ $cx=$w1[$flen]+$c*$w2[$flen]; // 4=5+$c*16; $word=mb_substr($word1,$c,1); ImageTTFText($im,16,0,$cx,18, $ix,$mfont,$word); } $i=0; while ($i<50) { if(file_exists($f)){echo 'ff<br>'; break; } sleep(0.25); $i++; } ImagePNG($im,$f); ImageDestroy($im); } } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); //ImagePNG($im); ?>
保存
取消
返回文件列表