You can use FireMsg API by sending a Curl POST request like this:
$ curl -s -X POST -d "secret=my secret&json=true" https://firemsg.cc
The Url with your encrypted message will look like this in a JSON object:
{"url":"https://firemsg.cc/?k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
(Currently theres no usage limitation on the API.)
<?php
$post_fields = [
"secret" => "my secret",
"json" => "true"
];
$ch = curl_init("https://firemsg.cc");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));
$response = curl_exec($ch);
if(curl_errno($ch)) {
echo "cURL error: " . curl_error($ch);
}
else {
$data = json_decode($response, true);
print_r($data);
}
curl_close($ch);
?>
import requests
url = "https://firemsg.cc"
payload = {
"secret": "my secret",
"json": "true"
}
response = requests.post(url, data=payload)
try:
data = response.json()
print(data)
except ValueError:
print("Response is not JSON:")
print(response.text)
Save as firemsg.sh
and make it executable with chmod +x firemsg.xh
Run it with ./firemsg.sh
#!/bin/bash
URL="https://firemsg.cc"
SECRET="my secret"
response=$(curl -s -X POST -d "secret=$SECRET&json=true" "$URL")
echo "Response from firemsg.cc:"
echo "$response"
$uri = "https://firemsg.cc"
$body = @{
secret = "my secret"
json = "true"
}
$response = Invoke-RestMethod -Uri $uri -Method Post -Body $body
$response | ConvertTo-Json -Depth 5