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,462
14년 전 조회 1,410
14년 전 조회 2,124
14년 전 조회 1,238
14년 전 조회 1,745
14년 전 조회 1,161
14년 전 조회 1,176
14년 전 조회 1,693
14년 전 조회 1,297
14년 전 조회 1,732
14년 전 조회 2,171
14년 전 조회 1,558
14년 전 조회 1,747
14년 전 조회 1,198
14년 전 조회 1,809
14년 전 조회 1,883
14년 전 조회 2,793
14년 전 조회 1,170
14년 전 조회 1,185
14년 전 조회 2,017
14년 전 조회 1,291
14년 전 조회 1,253
14년 전 조회 1,205
14년 전 조회 1,448
14년 전 조회 1,290
14년 전 조회 1,713
14년 전 조회 1,153
14년 전 조회 3,034
14년 전 조회 2,926
14년 전 조회 1,431