T

극악의 서버로 제작중인 워터마크 시스템

|

댓글 9개

<?php
header('content-type: image/jpeg');
include_once("_common.php");
$query = "select * from $g4[news_config]";
$result = mysql_query($query);
if($result == ""){
$news_config[watermark_file] = "";
}else{
$news_config = mysql_fetch_array($result);
$news_config[watermark_file] = str_replace("../", "http://".$_SERVER['SERVER_NAME']."/", $news_config[watermark_file]);
}
$_GET['src'] = base64_decode($_GET['src']);
$watermark = imagecreatefromgif($news_config[watermark_file]);
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);
$image = imagecreatetruecolor($watermark_width, $watermark_height);
$image = imagecreatefromjpeg($_GET['src']);
$size = getimagesize($_GET['src']);
//$dest_x = $size[0] - $watermark_width - 5;
$dest_x = ($size[0]/2)-($watermark_width/2);
$dest_y = $size[1] - $watermark_height - 5;
imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 50);
imagejpeg($image);
imagedestroy($image);
imagedestroy($watermark);
?>
알흠 다워요.
위에 있는것이 소스입니다.~~
새로고침 여러번했더니 서버가 죽은듯?
드디어!!!!!
저와 같은 상황이네요.
지금 작업 하는 상황이.....
1번 요청할때마다 20분 저도 끊기고 있습니다...
이미지 함수랑 정규식 함수가 전 제일 두려워요. ㅠㅠ
저두 요 ㅠ.ㅠ;;
좋군요

한번쯤 생각해봤던건데
^^
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
14년 전 조회 2,459
14년 전 조회 1,409
14년 전 조회 2,120
14년 전 조회 1,237
14년 전 조회 1,743
14년 전 조회 1,156
14년 전 조회 1,172
14년 전 조회 1,687
14년 전 조회 1,294
14년 전 조회 1,730
14년 전 조회 2,166
14년 전 조회 1,554
14년 전 조회 1,743
14년 전 조회 1,196
14년 전 조회 1,805
14년 전 조회 1,880
14년 전 조회 2,789
14년 전 조회 1,167
14년 전 조회 1,181
14년 전 조회 2,014
14년 전 조회 1,288
14년 전 조회 1,251
14년 전 조회 1,201
14년 전 조회 1,442
14년 전 조회 1,287
14년 전 조회 1,708
14년 전 조회 1,151
14년 전 조회 3,032
14년 전 조회 2,923
14년 전 조회 1,428