폼메일에 스팸이 계속들어오는데 조건문달려면 어떻게 해야되나요...

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
폼메일에 스팸이 계속들어오는데 조건문달려면 어떻게 해야되나요...

QA

폼메일에 스팸이 계속들어오는데 조건문달려면 어떻게 해야되나요...

본문

이름 : Purify and RejuvenateYour Body: http://pure-colon-detox.info

연락처 : 9333333333

문의사항 : Purify and RejuvenateYour Body!

- Flushes Toxins from the Body
- Kick-Starts Weight-Loss
- Relieves Constipation & Bloating
- Increases Energy Levels

http://pure-colon-detox.info 


이런식으로 스팸이 계속오는데

.info가 들어간 내용은 안보내지게 차단할 수 없을까요?

사용중인 코드입니다.

조건문 코드 조금만 알려주세요..

도움부탁드립니다. ㅠ



<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>실시간 수술 상담</title>
	</head>
	<link rel="stylesheet" href="form_style.css">
	<body>
    <div id="form_wrapper">
		<form name="contactform" method="post" action="send.php">
			<table id="form_container">
				<tr>
					<td class="form_text">
						<label for="first_name">이름</label>
					</td>
					<td>					
						<input class="index_box" name="first_name"  type="text" maxlength="50">
					</td>
				</tr>
				<tr>
					<td class="form_text">
						<label for="telephone">연락처</label>
					</td>
					<td>
						<input class="index_box" name="telephone"  type="text" maxlength="30">
					</td>
				</tr>
				<tr>
					<td class="form_text">
						<label for="comments">문의내용</label>
					</td>
					<td valign="bottom">
						<textarea class="consult_box" name="comments"></textarea>
					</td>
				</tr>
				<tr>
					<td>
						<label for="chk"></label>
					</td>
					<td class="form_text" valign="bottom">
						개인정보수집 및 이용에 동의<input type="checkbox" name="chk" value="Y">
					</td>
				</tr>				
				<tr>
					<td colspan="2" style="text-align:center">
						<input class="send_box" type="submit" value="상담신청">
					</td>
				</tr>
			</table>
		</form>
    </div>
	</body>
</html>


이 질문에 댓글 쓰기 :

답변 2


if(preg_match("/[\xE0-\xFF][\x80-\xFF][\x80-\xFF]/", $InputValue))   
     //글작성 허용
else
    // 꺼져


현재 스팸을 보내는 조건중에서 이상적인 필터링 형태는 한글이 포함되어 있냐 아니냐 인듯 싶네요

한글이 없으면 통과 안시키는 방법은 어떠실지...

form을 아래 처럼 추가하시고

<form name="contactform" method="post" action="send.php"  onsubmit="return fwrite_submit(this);">


</body> 태그 바로 위에 다음 스크립트를 삽입해 내용을 체크한 후

전송을 할 수 있게 처리하고 테스트해 보시죠.

물론 다른 방법도 있지만 이 파일 내용을 보여 주셨으니 ...


<script>

function fwrite_submit(f){

var content = f.comments.value;

if(content.indexOf(".info") != -1){

alert("잘못된 문자열이 포함되어 있습니다.");

f.comments.focus();

}


return true;

}

</script>



답변을 작성하시기 전에 로그인 해주세요.
전체 0
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT