查看文件: makevipname.php
大小: 1.38 KB
类型: application/octet-stream
<? $authnum2=(isset($_GET['authkey']))?$_GET['authkey']:rand(1000,9999).rand(1000,9999).rand(1000,9999);//'S1501229049'; //VASA $paypass='yskin112233'.date('Ymd');//date('Ymd');// $sha1code0= strtoupper(sha1($paypass.$authnum2 ) ) ; //$authnum='西絲朵拉' ;//"123456";//substr($sha1code0,1,6); //$authnum='西絲朵' ;//"123456";//substr($sha1code0,1,6); $authnum=isset($_GET['w'])?trim($_GET['w']):'西西絲絲朵拉拉' ;//"123456";//substr($sha1code0,1,6); Header("Content-type: image/PNG"); srand((double)microtime()*1000000); $im = imagecreate(125,24); $black = ImageColorAllocate($im, 0,0,0); $white = ImageColorAllocate($im, 255,255,255); $ix[0] = ImageColorAllocate($im, 0,0,255); $ix[1] = ImageColorAllocate($im, 255,0,0); $ix[2] = ImageColorAllocate($im, 255,255,0); $ix[3] = ImageColorAllocate($im, 255,0,0); $ix[4] = ImageColorAllocate($im, 255,255,255); $gray = ImageColorAllocate($im, 200,200,200); imagefill($im,0,0,$white);// $gray$white $mfont="/www2/skybni/fonts/kaiu.ttf"; // strlen // 4 word $w1=array(0,0,36,30,26,18,9,0); $w2=array(0,0,32,22,18,18,18,18); $flen=mb_strlen($authnum); for ($c=0;$c<mb_strlen($authnum);$c++){ $cx=$w1[$flen]+$c*$w2[$flen]; // 4=5+$c*16; $word=mb_substr($authnum,$c,1); ImageTTFText($im,16,0,$cx,18, $ix[0],$mfont,$word); } ImagePNG($im); ImageDestroy($im); ?>
保存
取消
返回文件列表