- $img = ImageCreate(180,50);
- $ip = $_SERVER[REMOTE_ADDR];
- ImageColorTransparent($img,$bgcolor);
- $bgColor = ImageColorAllocate($img, 0x2c,0x6D,0xAF); // Background color
- $shadow = ImageColorAllocate($img, 250, 0,0); // Shadow color
- $textColor = ImageColorAllocate($img, oxff,oxff,oxff); // Font color
- ImageTTFText($img,10,0,78 ,30,$shadow,"c:/windows/fonts/Tahoma.ttf",$ip);
- //Display background
- ImageTTFText($img,10,0,25, 28,$textColor,"c:/windows/fonts/Tahoma.ttf","your ip is".$ip);
- // Display IP
- ImagePng($img);
- imagecreatefrompng($img);
- ImageDestroy($img);
- ?>
-
http://www.bkjia.com/PHPjc/486127.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486127.htmlTechArticle?php $img = ImageCreate(180,50); $ip = $_SERVER[REMOTE_ADDR]; ImageColorTransparent($ img,$bgcolor); $bgColor = ImageColorAllocate($img, 0x2c,0x6D,0xAF); // Background color $shadow = I...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn