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,443
14년 전 조회 1,395
14년 전 조회 2,107
14년 전 조회 1,219
14년 전 조회 1,716
14년 전 조회 1,134
14년 전 조회 1,154
14년 전 조회 1,669
14년 전 조회 1,274
14년 전 조회 1,712
14년 전 조회 2,154
14년 전 조회 1,539
14년 전 조회 1,725
14년 전 조회 1,184
14년 전 조회 1,789
14년 전 조회 1,863
14년 전 조회 2,772
14년 전 조회 1,157
14년 전 조회 1,163
14년 전 조회 1,997
14년 전 조회 1,276
14년 전 조회 1,231
14년 전 조회 1,188
14년 전 조회 1,429
14년 전 조회 1,274
14년 전 조회 1,699
14년 전 조회 1,133
14년 전 조회 3,016
14년 전 조회 2,906
14년 전 조회 1,411
🐛 버그신고