웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
배경그림과 글자색상,배경색상을 지정해주는 php스크립트
2002.07.07 14:07
http://club.sayclub.com/myclub_index.nwz?clubid=javaapplet<script language=php>
// YoShi - php4zend@hotmail.com
// webpage http://yoshi.play.co.kr
Header("Content-type: image/png"); // 이미지 형식을 정한다. (Gif 도 됨)
if(!isset($s)) $s=20; // 글자 크기를 지정한다
if(!isset($text)) $text=YoShi; // $text 변수가 없을때 나올 텍스트
if(!isset($font)) $font="font3.TTF"; // 폰트를 정한다
$size = imagettfbbox($s,0,$font,$text);
$xpad = 100; // 가로크기
$ypad = 100; // 세로크기
$im = imagecreate($xpad+100,$ypad+100);
ImageColorAllocate($im,0xff,0xff,0xff); // 배경색
$white = ImageColorAllocate($im,0x66,0x66,0xFF); // 글자색
ImageTTFText($im,$s,45,(int)($xpad-20),(int)($ypad+20),$white,$font,$text);
ImagePNG($im);
ImageDestroy($im);
</script>
http://club.sayclub.com/myclub_index.nwz?clubid=javaapplet 동호회에서 알게되었습니다.
위에 있는
// YoShi - php4zend@hotmail.com
// webpage http://yoshi.play.co.kr
분이 직접 프로그래밍하셨는가봐요..^^ 좋은것 같아 올립니다..^^
// YoShi - php4zend@hotmail.com
// webpage http://yoshi.play.co.kr
Header("Content-type: image/png"); // 이미지 형식을 정한다. (Gif 도 됨)
if(!isset($s)) $s=20; // 글자 크기를 지정한다
if(!isset($text)) $text=YoShi; // $text 변수가 없을때 나올 텍스트
if(!isset($font)) $font="font3.TTF"; // 폰트를 정한다
$size = imagettfbbox($s,0,$font,$text);
$xpad = 100; // 가로크기
$ypad = 100; // 세로크기
$im = imagecreate($xpad+100,$ypad+100);
ImageColorAllocate($im,0xff,0xff,0xff); // 배경색
$white = ImageColorAllocate($im,0x66,0x66,0xFF); // 글자색
ImageTTFText($im,$s,45,(int)($xpad-20),(int)($ypad+20),$white,$font,$text);
ImagePNG($im);
ImageDestroy($im);
</script>
http://club.sayclub.com/myclub_index.nwz?clubid=javaapplet 동호회에서 알게되었습니다.
위에 있는
// YoShi - php4zend@hotmail.com
// webpage http://yoshi.play.co.kr
분이 직접 프로그래밍하셨는가봐요..^^ 좋은것 같아 올립니다..^^
제목 | 글쓴이 | 날짜 |
---|---|---|
1900년부터 2043년까지 음력을 양력으로..... [3] | pupstar | 2001.08.14 |
양력을 음력으로... [7] | pupstar | 2001.08.14 |
mysql_fetch_row함수와 mysql_fetch_array함수의 차이점. [4] | webzzang | 2001.08.22 |
php 로 swf 맹글기 [3] | 리산 | 2001.08.30 |
남은 계정 용량 확인하는 PHP [17] | 겜올드™ | 2001.09.09 |
Imagechar() 함수에서 한문자씩쓰는거 여러글짜이어쓰는함수 | 김승태 | 2001.10.20 |
자동차세 연체가산금 계산기 | secret | 2001.04.02 |
[GD] 이미지 회전 함수 공개합니다. [7] | 노경민 | 2001.11.05 |
알렉사 순위 가져오는 스크립트;; [30] | zero | 2001.11.06 |
게시판 만들 때 스팸메일을 막을 수 있는 방법중 한개. [11] | WOWpc | 2001.11.09 |
[추천 소스] 특정일로부터 몇일 지났나 또는 몇일 남았나 알아보는 소스 ㅡ.ㅡ; [1] | 타스케 | 2001.11.15 |
컴에 phpMyAdmin 깔고 원격 Mysql 관리.(이것도 팁이 되려나?) [1] | 최형삼 | 2001.11.17 |
phpMyAdmin에서 dump 안 되시는 분들 보세요 [5] | 똥가리 | 2001.11.18 |
MySQL에서 한글 정렬 문제 [2] | 손정호 | 2001.11.21 |
[추천 소스] phpMyAdmin 다중사용자용... [5] | WOWpc | 2001.11.29 |
[추천 팁] 디망쉬식 스킨 시스템 [4] | 디망쉬 | 2001.12.11 |
파일시스템(배열)에서의 검색기능 [5] | 두기두바 | 2002.01.09 |
파일시스템에서 비밀번호 생성/수정/인증 [7] | 두기두바 | 2002.01.10 |
cron을 이용해 윈앰프 방송정보를 빠르게 분석. [9] | Romeo | 2002.01.15 |
[PHP]모르는 분이 있는듯 해서...변수관련 [2] | TheMics | 2002.01.24 |
(태클 걸어서 죄송;;)