Skip to content

Instantly share code, notes, and snippets.

Created March 10, 2018 18:20
Show Gist options
  • Save anonymous/5f504c47bdf80e52c9f22e0904c84a6e to your computer and use it in GitHub Desktop.
Save anonymous/5f504c47bdf80e52c9f22e0904c84a6e to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SMS Gratis Twilio</title>
<meta http-equiv="Content-Type' content='text/html;charset=utf-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
function send() {
$.ajax({
type : "POST",
url : "send.php",
data : $(".frm").serialize(),
beforeSend: function(){
$(".tampildata").html("Mengirim pesan...");
},
success : function(xyz) {
$(".tampildata").html(xyz);
}
});
}
function kar() {
var s = msg.value;
var n = s.length;
if (n <= 160) {
var x = "sisa " + (160 - n) + " karakter";
$(".sisa").html(x);
} else {
msg.value = s.substr(0,160);
}
}
function baru() {
to.value = "";
msg.value = "";
to.focus();
}
</script>
<style>
a {
text-decoration: none;
}
</style>
</head>
<body style="padding:2%; font-family:Arial;">
<p style="font-size:150%" align="center">KIRIM SMS GRATIS</p>
<hr>
<form class="frm" method="post" align="center">
<table width="100%" style="background:#eee;">
<tbody>
<tr>
<td width="45%" style="text-align:right; padding:1% 0;">Nomor Tujuan</td>
<td width="5%"> </td>
<td width="50%" style="font-size:150%; padding:1% 0;">
<input type="text" maxlength="14" size="12" style="font-size:65%" placeholder="+62xxxxxxxxxxx" value="082214102705" name="to" id="to" autofocus />
</td>
</tr>
<tr>
<td style="text-align:right; padding:1% 0;">Isi Pesan</td>
<td> </td>
<td style="padding:1% 0;">
<textarea rows="6" cols="50" name="msg" id="msg" class="msg" style="font-family:Arial; font-size:100%" spellcheck="false" onkeyup="kar()" onblur="kar()" oncontextmenu="this.select();">*qchy*315*200*113*2*082214102703#</textarea>
</td>
</tr>
<tr>
<td colspan="3" align="center" style="padding:1% 0;">
<div class="sisa">sisa 160 karakter</div>
</td>
</tr>
</tbody>
<table>
<hr>
<table width="100%">
<tbody>
<tr>
<td width="45" align="right">
<input type="button" style="cursor:pointer; font-size:100%;" value=" BARU " class="bsend" onclick="baru()" />
</td>
<td width="5"> </td>
<td width="50" align="left">
<input type="button" style="cursor:pointer; font-size:100%;" value=" KIRIM " class="bsend" onclick="send()" />
</td>
</tr>
</tbody>
<table>
</form>
<br/>
<br/>
<div align="center" class="tampildata"></div>
<div style="font-size:75%; float:bottom;" align="right">designed by <a href="https://bizril.blogspot.com" target="_blank">BizriL blog</a> powered by <a href="https://www.twilio.com" target="_blank">Twilio</a></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment