I would like to send SMS thank to the "Textbelt" API (more informations on https://github.com/typpo/textbelt and http://textbelt.com/ ). I tried several methods (php, browser extension, jquery etc...) but I got each time a bug and it displayed "null" variables or error messages (with some "echo" and "var_dump" for testing). Just one solution seems to work, but no SMS is sent. Indeed, when I start this script, I get in a red board "{ "success": true }" but no SMS is sent. Have you some ideas in order to fix it please ? Did I make a mistake ?
Here is the code of this short script :
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
$(function(){
var g= $.post("http://textbelt.com/intl",
{
number: "0033xxxxxxxxx",
message: "testing https://github.com/typpo/textbelt"
}
).done(function (){
$('#output1').html(g.responseText);
});
}
);
</script>
<style>
#output2 {
border: 2px solid green;
}
#output1 {
border: 2px solid red;
}
</style>
</head>
<body>
<div id="output1"></div>
<div id="output2"></div>
</body>