-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
291 lines (242 loc) · 11.8 KB
/
index.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<?php
define("BASE_URL", "http://localhost/cURL-with-web-interface/");
$baseurl = 'http://localhost/cURL-with-web-interface/';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>cURL Your Link!</title>
<link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/css/bootstrap.min.css">
<script type='text/javascript' src='<?php echo BASE_URL; ?>assets/js/bootstrap.min.js'></script>
</head>
<body>
<div class="col-12 p-3 bg-info text-white">
<div class="row">
<div class="col">
cURL Your Link
</div>
<div class="col text-right">
Dibuat dengan sepenuh hati menggunakan PHP
</div>
</div>
</div>
<div class="col-12 p-3 bg-light text-dark" style="padding-bottom: 100px">
<div class="container">
<blockquote class="blockquote text-center" style="margin: 100px 0px">
<p class="mb-0">Curl merupakan singkatan dari “Client URL”. Curl command dibuat untuk mengecek</br> konektivitas ke URL dan juga sebagai tool transfer data.</p>
<footer class="blockquote-footer">Penjelasan cURL</footer>
</blockquote>
<form action="<?php echo BASE_URL; ?>result.php" method="post">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-default">Url :</span>
</div>
<input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" name="url">
</div>
<div class="container">
<div class="d-flex justify-content-center" style="margin-bottom: 50px">
<div class="col form-check form-check-inline">
<input class="form-check-input" type="radio" name="method" id="inlineRadio1" value="POST" checked>
<label class="form-check-label" for="inlineRadio1">POST</label>
</div>
<div class="col form-check form-check-inline">
<input class="form-check-input" type="radio" name="method" id="inlineRadio1" value="GET">
<label class="form-check-label" for="inlineRadio1">GET</label>
</div>
<div class="col form-check form-check-inline">
<input class="form-check-input" type="radio" name="method" id="inlineRadio1" value="PUT">
<label class="form-check-label" for="inlineRadio1">PUT</label>
</div>
<div class="col form-check form-check-inline">
<input class="form-check-input" type="radio" name="method" id="inlineRadio1" value="DELETED">
<label class="form-check-label" for="inlineRadio1">DELETE</label>
</div>
</div>
</div>
<h5 class="text-center">FORM FIELD</h5>
<div class="container">
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req1" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key1" name="key1" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value1" name="value1" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req2" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key2" name="key2" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value2" name="value2" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req3" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key3" name="key3" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value3" name="value3" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req4" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key4" name="key4" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value4" name="value4" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req5" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key5" name="key5" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value5" name="value5" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req6" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key6" name="key6" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value6" name="value6" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req7" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key7" name="key7" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value7" name="value7" disabled>
</div>
</div>
</div>
<div class="form-check row" style="margin-bottom: 20px">
<input class="form-check-input" type="checkbox" id="req8" value="option1" name="check1" aria-label="...">
<div class="form-row">
<div class="col-4">
<input type="text" class="form-control" placeholder="KEY" id="key8" name="key8" disabled>
</div>
<div class="col-8">
<input type="text" class="form-control" placeholder="VALUE" id="value8" name="value8" disabled>
</div>
</div>
</div>
<input id='key1hidden' type='hidden' value='No' name='key1'>
<input id='value1hidden' type='hidden' value='No' name='value1'>
<input id='key2hidden' type='hidden' value='No' name='key2'>
<input id='value2hidden' type='hidden' value='No' name='value2'>
<input id='key3hidden' type='hidden' value='No' name='key3'>
<input id='value3hidden' type='hidden' value='No' name='value3'>
<input id='key4hidden' type='hidden' value='No' name='key4'>
<input id='value4hidden' type='hidden' value='No' name='value4'>
<input id='key5hidden' type='hidden' value='No' name='key5'>
<input id='value5hidden' type='hidden' value='No' name='value5'>
<input id='key6hidden' type='hidden' value='No' name='key6'>
<input id='value6hidden' type='hidden' value='No' name='value6'>
<input id='key7hidden' type='hidden' value='No' name='key7'>
<input id='value7hidden' type='hidden' value='No' name='value7'>
<input id='key8hidden' type='hidden' value='No' name='key8'>
<input id='value8hidden' type='hidden' value='No' name='value8'>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary btn-lg">Submit</button>
</div>
</form>
</div>
<div class="container text-center" style="margin-top:100px; margin-bottom: 100px">
<h1 class="display-4">
Kelompok 7
</h1>
<p class="lead">
Sultan Baharuddin Ulil Amrie - 42517016</br>
Hasri Annisa - 42517034</br>
Gabril Hozanna - 42517042
</p>
</div>
</div>
<div class="col-12 p-3 bg-dark text-white text-center">
<!-- Footer -->
<footer class="page-footer font-small blue">
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2020 Copyright:
<a href="https://t.me/Roooodie"> Sultan Baharuddin Ulil Amrie</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
</div>
</body>
</html>
<script>
document.getElementById('req1').onchange = function() {
document.getElementById('key1').disabled = !this.checked;
document.getElementById('value1').disabled = !this.checked;
document.getElementById('key1hidden').disabled = true;
document.getElementById('value1hidden').disabled = true;
};
document.getElementById('req2').onchange = function() {
document.getElementById('key2').disabled = !this.checked;
document.getElementById('value2').disabled = !this.checked;
document.getElementById('key2hidden').disabled = true;
document.getElementById('value2hidden').disabled = true;
};
document.getElementById('req3').onchange = function() {
document.getElementById('key3').disabled = !this.checked;
document.getElementById('value3').disabled = !this.checked;
document.getElementById('key3hidden').disabled = true;
document.getElementById('value3hidden').disabled = true;
};
document.getElementById('req4').onchange = function() {
document.getElementById('key4').disabled = !this.checked;
document.getElementById('value4').disabled = !this.checked;
document.getElementById('key4hidden').disabled = true;
document.getElementById('value4hidden').disabled = true;
};
document.getElementById('req5').onchange = function() {
document.getElementById('key5').disabled = !this.checked;
document.getElementById('value5').disabled = !this.checked;
document.getElementById('key5hidden').disabled = true;
document.getElementById('value5hidden').disabled = true;
};
document.getElementById('req6').onchange = function() {
document.getElementById('key6').disabled = !this.checked;
document.getElementById('value6').disabled = !this.checked;
document.getElementById('key6hidden').disabled = true;
document.getElementById('value6hidden').disabled = true;
};
document.getElementById('req7').onchange = function() {
document.getElementById('key7').disabled = !this.checked;
document.getElementById('value7').disabled = !this.checked;
document.getElementById('key7hidden').disabled = true;
document.getElementById('value7hidden').disabled = true;
};
document.getElementById('req8').onchange = function() {
document.getElementById('key8').disabled = !this.checked;
document.getElementById('value8').disabled = !this.checked;
document.getElementById('key8hidden').disabled = true;
document.getElementById('value8hidden').disabled = true;
};
</script>