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,487
14년 전 조회 1,435
14년 전 조회 2,149
14년 전 조회 1,261
14년 전 조회 1,780
14년 전 조회 1,176
14년 전 조회 1,202
14년 전 조회 1,727
14년 전 조회 1,317
14년 전 조회 1,765
14년 전 조회 2,196
14년 전 조회 1,577
14년 전 조회 1,775
14년 전 조회 1,224
14년 전 조회 1,836
14년 전 조회 1,908
14년 전 조회 2,810
14년 전 조회 1,196
14년 전 조회 1,214
14년 전 조회 2,049
14년 전 조회 1,316
14년 전 조회 1,280
14년 전 조회 1,238
14년 전 조회 1,479
14년 전 조회 1,315
14년 전 조회 1,742
14년 전 조회 1,181
14년 전 조회 3,053
14년 전 조회 2,957
14년 전 조회 1,455