홈페이지 또는 블로그에 SMS (문자 메세지) 보내는 소스를 설명 드리도록 하겠습니다.
일단 제가 알고 있는 방법은 두가지가 있습니다.
Cafe24 (http://www.cafe24.com)를 이용하는 방법과 문자나라 (http://www.winc7788.co.kr)를 이용하는 방법이 있는데 먼저 카페 24를 이용해 만드는 방법을 설명 드리도록 하겠습니다.

Cafe 24
Cafe24 (http://www.cafe24.com)
먼저 회원 가입을 해야 겠죠. 그다음 상단 오른쪽 메뉴중 SMS호스팅을 신청합니다. 공짜냐구요? 이바닥에 공짜가 어디 있겠습니까?
SMS 호스팅 신청 후 소스를 받습니다.
소스는 다음과 같습니다.
<form method="post" action="http://고객아이디.cafe24.com/sms_send.php">
<input type="hidden" name="user_id" value="고객아이디"><br>
<input type="password" name="passwd" ><br>
전송메세지<input type="text" name="msg" maxlength="80"><br>
받는 번호<input type="text" name="rphone1" maxlength="3">-
<input type="text" name="rphone2" maxlength="4">-
<input type="text" name="rphone3" maxlength="4"><br>
보내는 번호<input type="text" name="sphone1" maxlength="3">-
<input type="text" name="sphone2" maxlength="4">-
<input type="text" name="sphone3" maxlength="4"><br>
예약 날짜<input type="text" name="rdate" maxlength="8"><br>
예약 시간<input type="text" name="rtime" maxlength="6"><br>
return url <input type="text" name="returnurl" maxlength="64"><br>
<!-- back step <input type="text" name="backstep" maxlength="1"><br> -->
test flag <input type="text" name="testflag" maxlength="1">
nointeractive <input type="text" name="nointeractive" maxlength="1"><br>
<input type="submit">
</form>
이 중 보이고 싶지 않는 메뉴(예를 들어 예약 전송이라던가, 아이디 입력란이라던가...)는 input type="text"를 input type="hidden"으로 바꿔 숨김으로 설정 합니다.
위의 소스중 고객아이디라고 적혀 있는곳에 아이디를 적으시고 소스를 입력 하시면 SMS발송 페이지가 완성됩니다.
이번엔 문자나라를 이용한 방법을 설명 드리도록 하겠습니다.

문자나라
문자나라 (http://www.winc7788.co.kr)
이곳도 마찬가지로 회원 가입을 먼저 합니다. 문자나라의 장점은 회원 가입시 문자 전송 3건을 무료로 줍니다. 이정도면 테스트하기엔 부족함이 없으리라 봅니다.
이제 소스를 받아 오도록 합니다.
<style>
.lcd { overflow: hidden; font-family:돋움체; font-size: 9pt; border:0 solid;
color: black; background-color: #BBEFFE; width:99; height: 85}
.input {height:16px;font-size:9pt;border:1px solid silver;color:gray;}
.input_none {font-size: 12px; border: none; background-color: transparent;}
a:link { COLOR: #0B4279; FONT: 9pt 굴림; TEXT-DECORATION: none }
a:visited { COLOR: #0B4279; FONT: 9pt 굴림; TEXT-DECORATION: none }
a:hover { COLOR: #FF0000 ; FONT: 굴림; TEXT-DECORATION: none }
td { COLOR: #464400 ; FONT: 9pt 굴림; TEXT-DECORATION: none }
</style>
<script>
function DoClear(tg) {
if (tg.value == tg.defaultValue) {
tg.value = '';
}
CalByte(tg);
}
function CalByte(tg){
var curText;
var strLen;
var byteIs;
var lastByte;
var thisChar;
var escChar;
var curTotalMsg;
var okMsg;
curText = new String(tg.value);
strLen = curText.length;
byteIs = 0;
for(i=0; i<strLen; i++) {
thisChar = curText.charAt(i);
escChar = escape(thisChar);
if (escChar.length > 4) {
byteIs += 2; //특수문자 한글인 경우.
}else if(thisChar != '\r') { //개행을 제외한 이외의 경우
byteIs += 1;
}
if(byteIs > 80){
alert('[안 내] 80바이드(한글40자)를 초과하실 수 없습니다.');
thisText = curText.substring(0, i);
tg.value = thisText;
byteIs = lastByte;
break;
}
lastByte = byteIs;
}
document.all.byte.value = byteIs;
}
function ClearMsg(){
document.all.message.value = '';
CalByte(document.send_msg.message);
document.send_msg.message.focus();
}
function CheckIt(fm){
if(!fm.message.value || fm.message.value == fm.message.defaultValue){
alert("[안내] 내용을 입력하세요.");
ClearMsg();
return false;
}
if(!fm.sender.value || fm.sender.value.length < 10){
alert("[안내] 보내는 분의 전화번호를 정확히 입력하세요.");
fm.sender.focus();
return false;
}
return true;
}
</script>
<form method="post" name="send_msg" target="hidfrm" action="http://www.winc7788.co.kr/MSG/send/
web_admin_send.htm" onSubmit="return CheckIt(this)">
<table border="0" cellpadding="0" cellspacing="0" width="148">
<tr>
<td width="148" height="52" background="http://www.winc7788.co.kr/MSG/img/sms_head.gif">
<table border="0" cellpadding="0" cellspacing="0" width="148">
<tr>
<td width="148" height="30" colspan="2">
<input type="hidden" name="userid" value="문자나라아이디">
<input type="hidden" name="passwd" value="문자나라비밀번호">
<input type="hidden" name="receiver" value="받는번호">
<input type="hidden" name="end_alert" value="1">
</td>
</tr>
<tr>
<td width="78" align="right">
<input type="text" name="byte" class="input_none" value="0"
size="2" maxsize="3" readonly> byte
</td>
<td width="70" align="center">
<a href="javascript:ClearMsg()" title="내용을 지웁니다." onFocus="blur()"
onMouseOver='status="입력하신 메세지 내용을 지웁니다.";return true'
onMouseOut='status=""'><img src="http://www.winc7788.co.kr/MSG/img/del01.gif" border="0"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="148" height="98" background="http://www.winc7788.co.kr/MSG/img/sms_body.gif" align="center">
<textarea name='message' class='lcd' onclick='DoClear(this)' onselect=
'DoClear(this)' onkeydown='CalByte(this)' onchange='CalByte(this)' on
keyup='CalByte(this)'>[안내] 이곳에 메시지를 입력하세요.</textarea>
</td>
</tr>
<tr>
<td width="148" height="27" background="http://www.winc7788.co.kr/MSG/img/sms_foot1.gif" valign
="middle" align="center">
<a href="http://www.winc7788.co.kr/MSG/" target=""><font color="ye
llow">문자나라</font></a>
</td>
</tr>
<tr>
<td width="148" height="32" background="http://www.winc7788.co.kr/MSG/img/sms_foot2.gif" valign
="bottom" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="148">
<tr>
<td width="63" align="center">
<font color="gray">보내는분:</font>
</td>
<td width="85" align="left">
<input type="text" name="sender" size="11" maxlength="
11" style="ime-mode:disabled" class="input" value="">
</td>
</tr>
<tr>
<td width="148" height="5" colspan="2">
</td>
미리보기 모습
</tr>
</table>
</td>
</tr>
<tr>
<td width="148" height="5" align="center">
</td>
</tr>
<tr>
<td width="148" height="32" align="center">
<input type="image" src="http://www.winc7788.co.kr/MSG/img/msg_send_button.gif">
</td>
</tr>
</table></form>
<iframe src="" name=hidfrm marginwidth=0 marginheight=0 height=0 width=0 scrolling=no
border=0 frameborder=0></iframe>
이 중 문자나라아이디, 문자나라비밀번호, 받는번호만 바꾸신 후 소스를 입력 하시면 됩니다.
일부 블로그중엔 안될수도 있습니다. 왜냐하면 스킨에 따라 안되는 경우가 있습니다. 이 부분에 대해서는 저도 모르겠네요. 이럴땐 새창열기로 만드시는것이 좋을것 같습니다.
Posted by 야매
댓글을 달아 주세요
2009/11/26 13:05 댓글주소 수정/삭제 댓글쓰기
비밀댓글 입니다
저도 이번에 7을 한번 깔아 볼려고 합니다. 그동안 철저하게 XP만을 고집했는데 한번 갈아타 볼까 고민중이네요.