forked from orgds/orgds-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sendsms.php
49 lines (46 loc) · 2.14 KB
/
sendsms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
//include config file
include_once("config.php");
//get account balance
$apix_acct_balance_url = API_URL."?cmd=balance&token=".API_TOKEN;
$main_acct_balance_url = API_URL."?cmd=balance&username=".USERNAME."&password=".PASSWORD;
if (!$getbalance = file_get_contents($main_acct_balance_url)) {
$getbalance = "Unavailable";
}
//end get account balance
?>
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<title>OrgDS SMS API Form</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<form method="post" action="<?= API_URL ?>">
<h2>OrgDS.org</h2>
<hr>
<p><strong>Balance</strong> : <?= $getbalance; ?></p>
<p><strong>Sender</strong> : <em style="font-size: 90%;">(Max length: <b>11</b>)</em><br />
<input type="text" placeholder="Sender ID" name="senderid" maxlength="11" />
<p><strong>Recipient(s)</strong> : <em style="font-size: 90%;">(ex: 234803..., 234802..., 447032...)</em><br />
<textarea rows="4" cols="21" placeholder="Comma-separated recipient list" name="recipients"></textarea>
<p><strong>Message</strong> :<br />
<textarea placeholder="Type message here" name="message" rows="5" cols="21" ></textarea></p>
<p><strong>Send message via</strong> :<br>
<input type="radio" name="route" checked="checked" required="required" value="2" /> Basic Route<br>
<input type="radio" name="route" required="required" value="4" /> Corporate Route
</p>
<p>
<strong>Message type </strong> :
<br><input type="radio" name="type" required="required" value="0" checked="checked" /> Plain Text<br>
<input type="radio" name="type" required="required" value="1" /> Flash Message
</p>
<input type="hidden" name="cmd" value="send" />
<input type="hidden" name="username" value="<?= USERNAME ?>" />
<input type="hidden" name="password" value="<?= PASSWORD ?>" />
<!-- <input type="hidden" name="token" value="<?= API_TOKEN ?>" /> --> <!-- uncomment if using APIX TOKEN -->
<input type="submit" value="Send" />
</form>
</body>
</html>