-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
111 lines (101 loc) · 3.6 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<style>
[x-cloak] {
display: none !important;
}
.dnth,
domainname {
width: 75%;
}
successcode,
status {
display: none;
}
searchresponse {
display: table;
width: 100%;
}
searchheader {
display: table-row;
}
domainname,
available {
border-collapse: collapse;
color: #212529;
display: table-cell;
padding: 0.3rem;
vertical-align: top;
border-top: 1px solid #dee2e6;
}
available {
text-transform: capitalize;
}
</style>
<script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>
</head>
<body>
<div x-data="search" class="container">
<p class="h4 mt-5">Bulk Domain Search</p>
<div class="form-group">
<label for="domains">Enter Domains</label>
<textarea class="form-control" x-model="domains" rows="5" :class="error && 'is-invalid'" required></textarea>
<small id="passwordHelpBlock" class="form-text" :class="error ? 'invalid-feedback' : 'text-muted'">
Enter each domain on a separate line
</small>
</div>
<div class="form-group">
<label>Select Domain Extentions</label>
<div class="form-control">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="dotcom" x-model="domainexts" value="com" disabled>
<label class="form-check-label" for="dotcom">.com</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="dotorg" x-model="domainexts" value="org">
<label class="form-check-label" for="dotorg">.org</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="dotnet" x-model="domainexts" value="net">
<label class="form-check-label" for="dotnet">.net</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="dotco" x-model="domainexts" value="co">
<label class="form-check-label" for="dotco">.co</label>
</div>
</div>
</div>
<button @click="dosearch" class="btn btn-success" :disabled="loading">
Search Domains
<span x-show="loading" x-transition x-cloak class="spinner-border spinner-border-sm" role="status"
aria-hidden="true"></span>
</button>
<div x-html="result" x-show="!loading" x-transition></div>
</div>
<script>
document.addEventListener('alpine:init', () => {
Alpine.data('search', () => ({
loading: false,
error: false,
domains: '',
domainexts: ['com'],
result: '',
header: "<table class='table mb-0 table-sm mt-5'><thead><tr><th class='dnth'>Domain Name</th><th>Availability</th></tr></thead></table>",
dosearch() {
this.loading = true;
this.error = false;
if (this.domains == '') { this.error = true; this.loading = false; return; }
let domainStrings = this.domains.split('\n').map(name => name.toLowerCase().trim().replace(" ", "")).filter(e => e).toString();
if (domainStrings == '') { this.error = true; this.loading = false; return; }
// fetch(`https://your-domain.com/server.php?domains=${domainStrings}&domainexts=${this.domainexts.toString()}`)
fetch(`https://quickprox.com.ng/domainsearch/?domains=${domainStrings}&domainexts=${this.domainexts.toString()}`)
.then(response => response.text())
.then(data => { this.result = this.header + data; this.loading = false; })
},
}))
})
</script>
</body>
</html>