Á¦°¡ ÆÄÀÏ Ã·ºÎ ±â´É ¸¸µé°í ½ÍÀºµ¥¿ä ¾î¶»°Ô ÇÏ´ÂÁöµµ ¸ð¸£°Ú½À´Ï´Ù,
ÆÄÀÏ Ã·ºÎ ¼Ò½º´Â phpÀÎŬ·çµå ½á¼ µû·Î ÆÄÀÏ ¸¸µé·Á°í ÇÕ´Ï´Ù.
¾à°£ÀÇ Â¥Áý±â Çؼ ¼öÁ¤ Çß±¸¿ä
¸ÞÀÏ ³Ñ±â´Â Àü¼ÛÀº
sand_ok.php
<?
// Module
include "mailfile.php";
$tomail= "kjang88@empal.com"; //ÀÌ Æû¸ÞÀÏÀ» ¹ÞÀ» ¸ÞÀÏÁÖ¼Ò
function error($text){
echo "
<script language=javascript>
window.alert('$text')
history.go(-1)
</script>";
exit;
}
function msg($text){
echo "
<script language=javascript>
window.alert('$text')
top.location.href = 'http://donkey0u.webzero.co.kr/formtest1.html'
</script>
";
exit;
}
if (!$name) {
echo ("
<script>
window.alert ('À̸§À» ÀÔ·ÂÇÏ¿©ÁÖ¼¼¿ä')
history.go(-1)
</script>
");
exit;
}
if(eregi("¿î¿µÀÚ",$name)) Error("¿î¿µÀÚ À̸§À¸·Î »çĪÇÒ¼ö ¾ø½À´Ï´Ù.");
if (!$sex) {
echo ("
<script>
window.alert ('¼ºº°À» ÀÔ·ÂÇÏ¿©ÁÖ¼¼¿ä')
history.go(-1)
</script>
");
exit;
}
if (!$job) {error('¹®ÀÇ »çÇ×Àº ¹Ýµå½Ã ¼±ÅÃÇÏ¿©Áֽʽÿä');} // ¹®ÀÇ »çÇ×À» ¼±ÅÃÇÏÁö ¾Ê¾ÒÀ»¶§
if(eregi("¼±ÅÃÇÏ¿©ÁÖ¼¼¿ä",$job)) Error("¹®ÀÇ »çÇ×ÀÌ ¼±ÅõÇÁö ¾Ê¾Ò½À´Ï´Ù ..."); //¹®ÀÇ »çÇ×ÀÌ ¼±Åà µÇÁö ¾Ê¾ÒÀ»¶§
if (!$member) {error('ȸ¿ø ±¸ºÐÀ» ¼±ÅÃÇϼ¼¿ä');} // ¹®ÀÇ »çÇ×À» ¼±ÅÃÇÏÁö ¾Ê¾ÒÀ»¶§
if (!$email) {error(" EmailÀ» È®ÀÎÇϼ¼¿ä.") ;} // ¹Þ´Â ¸ÞÀÏÁÖ¼Ò³ª @ÀÌ ¾øÀ¸¸é ³ª¿À´Â ¿¡·¯¸Þ¼¼Áö
if (!$subject) {error(' Á¦¸ñÀÌ ºüÁ³½À´Ï´Ù.Á¦¸ñÀ» Àû¾îÁÖ¼¼¿ä');} // Á¦¸ñÀÌ ¾øÀ»¶§ ¿¡·¯ ¸Þ¼¼Áö
if (!$content) {error('³»¿ëÀ» Àû¾îÁÖ¼¼¿ä');} // Á¦¸ñÀÌ ¾øÀ»¶§ ¿¡·¯ ¸Þ¼¼Áö
if(eregi("¾¾¹ß",$content)) Error("¿å¼³Àº »ï°¡ÇϽñ⠹ٶø´Ï´Ù.¹Ù¸¥¸» °í¿î¸»À» ¾¹½Ã´Ù");
$mailheaders = "Return-Path: $email \r\n"; // ¸ÞÀÏ Çì´õÀÇ ¹Ý¼Û ¸ÞÀÏ ÁÖ¼Ò
$mailheaders .= "From: $name <$email>\r\n"; // ¸ÞÀÏÇì´õÀÇ À̸§°ú ¸ÞÀÏ ÁÖ¼Ò Ç¥½Ã
$mailbody .= base64_encode(nl2br($body))."\r\n\r\n";
$header .= "Content-Type: text/html;charset=EUC-KR";
$body .= " À̸§ : $name \r\n";
$body .= " ȸ¿ø ¿©ºÎ : $member \r\n";
$body .= " ȸ¿ø ¾ÆÀ̵ð : $id \r\n";
$body .= " ¸ÞÀÏÁÖ¼Ò : $email \r\n";
$body .= " ¼ºº° : $sex \r\n";
$body .= " ¹®ÀÇ »çÇ× : $job \r\n";
$body .= " Á¦ÈÞ ¹®ÀÇ ³»¿ë:$content \r\n";
$body .= " ÆÄÀÏ Ã·ºÎ:$filename \r\n";
$result=mail($tomail,$subject , $body , $mailheaders,$filename); // ¸ÞÀÏ Àü¼Û
//¹®ÀÇ ÀÚµ¿¸ÞÀϹ߼Û
$mrjh = "From:¿î¿µÀÚ<¼ö½Å Àü¿ë¸ÞÀÏÀ̹ǷΠ󸮰¡ µÇÁö ¾Ê½À´Ï´Ù@¼ö½Å Àü¿ë¸ÞÀÏÀ̹ǷΠ󸮰¡ µÇÁö ¾Ê½À´Ï´Ù>\r\nContent-Type:text/html"; //º»Àο¡°Ô ¸Â°Ô ¼öÁ¤
// ÀÚµ¿À¸·Î º¯°æµÇ¾î¼ ¸ÞÀÏÀÌ ¹ß¼ÛµÊ
$mrjh1="¿î¿µÀÚ";
$subject="$name"." ´ÔÀÇ ¹®ÀÇ ¸ÞÀÏ °¨»çÇÕ´Ï´Ù.^^!!$mrjh1"."¿¡°Ô ¹®ÀÇ°¡ Á¤»óÀûÀ¸·Î ¸ÞÀÏ ¹ß¼Û µÇ¾ú½À´Ï´Ù. [ÀÚµ¿¹ß¼Û¸ÞÀÏ]";
$body="
<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">
<table border=\"1\">
<tr>
<td width=\"483\" height=\"37\">
<p>$name"." ´Ô Áú¹®ÀÌ ÀÌ ÀÚµ¿¸ÞÀÏÀ» ¹ÞÀ¸¸é ¿î¿µÀÚ´Ô¿¡°Ô Á¤»óÀûÀ¸·Î Á¢¼ö°¡ ¿Ï·á°¡ µÇ¾ú½À´Ï´Ù</p>
</td>
</tr>
<tr>
<td width=\"483\" height=\"122\" valign=\"top\">
<form name=\"form1\">
<p><textarea name=\"formtextarea1\" rows=\"8\" cols=\"67\">$name"."´Ô ¹®ÀÇ ¸ÞÀÏ °¨»çÇÕ´Ï´Ù.24½Ã°£³»¿¡ ´äº¯ µå¸®°Ú½À´Ï´Ù.
´äº¯ÀÌ¿ÀÁö ¾ÊÀ¸¸é ´Ù½Ã ¹®ÀÇ ÇØÁÖ¼¼¿ä,°í°´´Ô ¹®ÀÇ »çÇ×Àº $job"." ÀÌ¸é ´äº¯ µå¸®°Ú½À´Ï´Ù[!º» ¸ÞÀÏÀº °í°´´ÔÀÇ ¹®ÀÇ¿¡ ´ëÇÑ ÀÚµ¿È¸½Å¸ÞÀÏÀ̸ç, ¹®ÀÇ¿¡ ´ëÇÑ ´äº¯Àº Á¢¼ö¼øÀ¸·Î 󸮵˴ϴÙ.!]</textarea></p>
</form>
</td>
</tr>
</table>
<FONT face=\"µ¸¿ò\" size=2><b>-±âŸ ¹®ÀÇ »çÇ×ÀÌ ÀÖÀ¸½Ã¸é °í°´¼¾ÅÍ·Î ¹®ÀÇ ÇÏ½Ã±æ ¹Ù¶ø´Ï´Ù.<BR>- Ç×»ó ½Å¼ÓÇÏ°í ¼º½ÇÇÑ ´äº¯À¸·Î ÃÖ¼±À» ´ÙÇÏ°Ú½À´Ï´Ù.
°¨»çÇÕ´Ï´Ù.¹®ÀÇ°¡ Á¤È®ÇÏÁö ¾ÊÀ¸¸é ó¸® µÇÁö ¾ÊÀ»¼öµµ ÀÖ½À´Ï´Ù.
<p>-
<a href=\"http://donkey0u.webzero.co.kr/formtest1.html\">[¹®ÀÇ »çÇ×]</a> Àç¹®ÀÇ ÇØÁÖ¼¼¿ä</body>
<p>º» ¸ÞÀÏÀº ¼ö½ÅÀü¿ëÀ̹ǷΠȸ½ÅÀ» ÅëÇÑ ¹®ÀǴ ó¸®µÇÁö ¾Ê½À´Ï´Ù.</p>
<html>
</head>
<body>
</body>
</html>
</b></FONT><b>
</b></body>
</html>
</body>
</html>
"; // ³»¿ëÀ» Àû¾îÁÖ¼¼¿ë..
mail($email , $subject , $body, $mrjh); // ¸ÞÀϺ¸³»±â ÇÔ¼ö
//¹®ÀÇ ÀÚµ¿¸ÞÀϹ߼Û
if($result){
echo("
<script>
window.alert(' $name ´Ô! ¹®ÀÇ ÇϽŠ»çÇ×Àº $job ÀÔ´Ï´Ù ¿î¿µÀÚ¿¡°Ô ¸ÞÀÏÀ» º¸³Â½À´Ï´Ù.¸ÞÀÏ Á¢¼öÈ®ÀÎÀº ÀÚµ¿¸ÞÀÏ ¹ß¼Û µÇ¿À´Ï È®ÀÎÇØÁÖ½Ã±æ ¹Ù¶ø´Ï´Ù.¸ÞÀÏÀÌ È®ÀÎ µÇÁö ¾ÊÀ¸¸é ´Ù½Ã ¹®ÀÇ ÇÏ¿©ÁÖ¼¼¿ä')
history.go(-1)
</script>
");
exit;
}
else{error('¸ÞÀÏ ¹ß¼Û¿¡ ½ÇÆÐ Çß½À´Ï´Ù.¿î¿µÀÚ¿¡°Ô ¹®ÀÇ Çϼ¼¿ä');} // Àü¼Û ½ÇÆнÃ
?> <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
fromtest1.html
<body alink="black" link="black" vlink="black">
<form method="post" action="http://donkey0u.webzero.co.kr/sand_ok.php" name="form">
<div align="left">
<table width="554" align="center">
<!--DWLayoutTable-->
<tr>
<td align="center" height="67" bgcolor="#FFFFFF" bordercolor="#FFFFFF" colspan="3" width="548">
<p> </p>
<p align="center"><FONT color=#008000><u>ȸ¿ø´ÔµéÀÇ ´Ù¾çÇÏ°í ÁÁÀº ÀÇ°ß ¸¹ÀÌ º¸³» ÁֽʽÿÀ. ^^*</u></FONT></p>
</td>
</tr>
<tr>
<td align="center" height="15" bgcolor="#FFFFFF" bordercolor="#FFFFFF" colspan="3" width="548"><p align="center"><b>¸ÞÀÏ Á¢¼ö Çϱâ</b></p> </td>
</tr>
<tr>
<td height="40" align="center" colspan="3" bgcolor="#F7F7F7" bordercolor="white" width="548"><table cellspacing="0" cellpadding="0">
<tr>
<td class="cust_02 style1"><strong><font size="2">»çÀ̹öÁö±â¿¡°Ô Á÷Á¢ ¹°¾îº¸½Ã¸é Ä£ÀýÇÏ°Ô ´äº¯ÇØ µå¸³´Ï´Ù</font></strong><font size="2">.</font><font size="2" color="red"><span class="cust_02 style1">*</span></font><font size="2">Ç¥½Ã´Â ÇʼöÀÔ·ÂÀÔ´Ï´Ù. </font></td>
</tr>
<tr>
<td></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="22" align="center" bgcolor="#F5F5F5" width="124">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span></font><font size="2" color="black">À̸§</font></p></td>
<td colspan="2" width="420">
<p align="left"><input type="text" name="name" maxlength="35" style="height:20; width:160" size="30"> </tr>
<tr>
<td height="20" align="center" valign="top" bgcolor="#F5F5F5" width="124">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span></font><font size="2" color="black">¼ºº°</font></p></td>
<td colspan="2" valign="top" width="420">
<p align="left"><input type="radio" value="³²ÀÚ" name="sex">³²ÀÚ
<input type="radio" value="¿©ÀÚ" name="sex"> ¿©ÀÚ
</tr>
<tr>
<td height="24" valign="top" bgcolor="#F5F5F5" width="124"><div align="left"> <p><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span>ȸ¿ø ±¸ºÐ </font></p></div></td>
<td colspan="2" valign="top" width="420"> <select name="member" id="member">
<option value="ȸ¿ø" selected>ȸ¿ø</option>
<option value="ºñȸ¿ø">ºñȸ¿ø</option>
<option value="ÀϹݱâ¾÷">ÀϹݱâ¾÷</option>
<option value="¿À·ù/Àå¾Ö">¿À·ù/Àå¾Ö</option>
</select>
</tr>
<tr>
<td height="18" valign="top" bgcolor="#F5F5F5" width="124"> <div align="left"> <p><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0"></span> ȸ¿ø ¾ÆÀ̵ð</font></p></div></td>
<td colspan="2" valign="top" width="420"><font size="2"><input name="user_id" type="text" id="id" value="" size="30" maxlength="35">
<span class="style1">ȸ¿ø ÀÏ°æ¿ì ÀÔ·ÂÇÏ¿©Áֽʽÿä </span></font></td>
</tr>
<tr>
<td rowspan="2" align="center" valign="top" bgcolor="#F5F5F5" width="124" height="10">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span>¹®ÀÇ »çÇ×</font></p></td>
<td height="0" width="415"></td>
<td width="1"></td>
</tr>
<tr>
<td colspan="2" valign="top" width="420" height="6">
<p align="left"><font size="2"><select name="job" size="1" class="unnamed1" style="margin:1; padding:1; border-width:1; border-style:solid; width:170;">
<option selected>--¼±ÅÃÇØÁÖ¼¼¿ä- -</option>
<option>¿î¿µÁø ½Åû</option>
<option>»çÀÌÆ® Á¦¾È</option>
<option>»çÀÌÆ® ¿À·ù¹× ¼öÁ¤ °ü·Ã</option>
<option>ȸ¿ø °¡ÀÔ¹× Å»Åð</option>
<option>ÀúÀÛ±Ç °ü·Ã</option>
<option>¸µÅ© ½Å°í</option>
<option>±¤°í ¹®ÀÇ</option>
<option>±âŸ¹®ÀÇ</option>
</select>
</font></p></td>
</tr>
<tr>
<td height="22" align="center" valign="top" bgcolor="#F5F5F5" width="124">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span></font><font size="2" color="black">À̸Þ(E-MAIL)</font></p></td>
<td valign="top" width="420" colspan="2">
<p align="left"><font size="2"><input name="email" type="text" style="height:20; width:160" size="30" maxlength="35">
</font><font size="2" face="±¼¸²Ã¼"><span class="style1">´äº¯¹ÞÀ¸½Ç¸ÞÀÏÁÖ¼Ò</span></font><font size="2">
</font>
</tr>
<tr>
<td height="22" align="center" bgcolor="#F5F5F5" width="124">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0">*</span></font><font size="2" color="black">Á¦¸ñ</font></p></td>
<td colspan="2" width="420">
<p align="left"><font size="2"><input type="text" name="subject" maxlength="35" style="height:20; width:316" size="30">
</font> </tr>
<tr>
<td height="158" bgcolor="#F5F5F5" width="124">
<p align="left"><font size="2"><span class="cust_02 style3"><img src="bu_purple.gif" width="9" height="9" border="0"></span></font><font size="2"><span class="cust_02 style3">*</span></font><font size="2" color="black">Á¦¾È³»¿ë </font></p></td>
<td colspan="2" width="420" height="158">
<p align="left">
<textarea name="content" cols="50" rows="9" id="content"></textarea>
</tr>
<tr>
<td width="124" height="22" bgcolor="whitesmoke"> </td>
<td width="420" height="22" colspan="2"><input type="file" name="formfile1"></td>
</tr>
<tr>
<td align="center" height="34" width="549" colspan="3">
<p align="center">
<INPUT NAME="submit" TYPE="image" value="submit" SRC="btn_email.gif" BORDER="0">
</tr>
</table>
</div>
</form>
<style type="text/css">
<!--
.style1 {font-size: 12px}
.unnamed2 {
clear: both;
float: none;
height: auto;
width: auto;
}
.style3 {color: #FF0000}
-->
</style>
óÀ½Æû ÆÄÀÏ Ã·ºÎ ÇÒ·Á¸é ¾î¶»°Ô ÇØ¾ß ÇÏ´ÂÁö¿ä
http://donkey0u.webzero.co.kr/formtest1.html
Çߴµ¥ ¾ÈµË´Ï´Ù.