import urllib
import urllib2
data = urllib.urlencode({"token":"your-api-token","to":"65987654321","msg":"Hello"})
req = urllib2.Request('https://www.kiemono.com/api/send.php', data)
response = urllib2.urlopen(req)
result = response.read()
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.kiemono.com/api/send.php");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "token=your-api-token&to=65987654321&msg=Hi+There");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 25);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close ($ch);
uri = URI::HTTPS.build(:host => "www.kiemono.com", :port => 443)
uri.path = URI.escape("/api/send.php")
client = Net::HTTP.new("www.kiemono.com", "80")
req = Net::HTTP::Post.new(uri.request_uri, {})
req.set_form_data({"token" => "your-api-token","to" => "65987654321", "msg" => "Hi+There"})
res = client.request(req)
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
public void sendData() throws IOException {
URL url = new URL("https://www.kiemono.com/api/send.php");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setInstanceFollowRedirects(true);
String postData = "token=your-api-token&to=65987654321&msg=Hi+there!";
con.setRequestProperty("Content-length", String.valueOf(postData.length()));
con.setDoOutput(true);
con.setDoInput(true);
DataOutputStream output = new DataOutputStream(con.getOutputStream());
output.writeBytes(postData);
output.close();
}
var client = new RestClient("https://www.kiemono.com/api/send.php");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "token=your-api-token&to=65987654321&msg=Hi+there!", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Client client("kiemono.com", 443);
String PostData = "token=your-api-token&to=65987654321&msg=Hi+there!";
if (client.connect()) {
client.println("POST /api/send.php HTTP/1.1");
client.println("Host: kiemono.com");
client.println("Connection: close");
client.println("Content-Type: application/x-www-form-urlencoded;");
client.print("Content-Length: ");
client.println(PostData.length());
client.println();
client.println(PostData);
}
curl https://www.kiemono.com/api/send.php?token=your-api-token&to=65987654321&msg=Hi+there!