This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
anothertest.php
188 lines (64 loc) · 2.3 KB
/
anothertest.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
include("config.php");
session_start();
?>
<style>
.numberbox{
width: 30%;
height: 50%;
background: rgba(0, 0, 20, 0.3);
color: #fff;
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%, -50%);
box-sizing: border-box;
padding: 70px 30px;
}
.box{
width: 50%;
box-sizing: border-box;
background: rgba(255,255,255);
}
</style>
<form action = "" method = "post">
<input type = "submit" name = "try" value = "Activate" />
</form>
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
if(isset($_POST['try'])){
?>
<div class="numberbox">
<center>
<form action = "" method = "post">
<p>Enter Phone Number: </p><input type = "text" name = "number1" id="number1" placeholder="Enter the S&D's phone number" class = "box"/>
<p>Confirm Phone Number: </p><input type = "text" name = "number2" id="number2" placeholder="Confirm S&D's phone number" class = "box"/>
<br><br><input type = "submit" name = "submitted" value = "Submit" />
</form>
</center>
</div>
<?php
if(isset($_POST['submitted'])){
$phone1 = mysqli_real_escape_string($db_con, $_POST['number1']);
$phone2 = mysqli_real_escape_string($db_con, $_POST['number2']);
print "Here: " .$phone1;
$curl = curl_init();
//$number = "+2348175917337";
$from = "Inventory";
$text = "External Shipment in another";
$url = "http://ngn.rmlconnect.net:8080/bulksms/bulksms?username=BabbanGona&password=K6kRuXKS&type=5&dlr=0&destination=".urlencode($phone1)."&source=".urlencode($from)."&message=".urlencode($text)."";
//$url = "https://www.example.com/file.php?phone=".urlencode($phone)."&message=".urlencode($message)."";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
//echo $result;
curl_close($curl);
}
}
}
?>
<script>
function showtyped(){
}
</script>