Update index.html
Browse files- index.html +69 -19
index.html
CHANGED
|
@@ -1,19 +1,69 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Phone Number Checker</title>
|
| 6 |
+
<style>
|
| 7 |
+
body {
|
| 8 |
+
font-family: Arial, sans-serif;
|
| 9 |
+
margin: 30px;
|
| 10 |
+
}
|
| 11 |
+
input, button {
|
| 12 |
+
padding: 10px;
|
| 13 |
+
margin: 5px;
|
| 14 |
+
width: 200px;
|
| 15 |
+
}
|
| 16 |
+
#result {
|
| 17 |
+
margin-top: 20px;
|
| 18 |
+
white-space: pre-wrap;
|
| 19 |
+
background-color: #f9f9f9;
|
| 20 |
+
padding: 15px;
|
| 21 |
+
border: 1px solid #ccc;
|
| 22 |
+
}
|
| 23 |
+
</style>
|
| 24 |
+
</head>
|
| 25 |
+
<body>
|
| 26 |
+
<h2>📞 Phone Number Checker</h2>
|
| 27 |
+
|
| 28 |
+
<label>Country Code (without +):</label><br>
|
| 29 |
+
<input type="text" id="countryCode" placeholder="e.g. 91"><br>
|
| 30 |
+
|
| 31 |
+
<label>Phone Number:</label><br>
|
| 32 |
+
<input type="text" id="phoneNumber" placeholder="e.g. 9768836827"><br>
|
| 33 |
+
|
| 34 |
+
<button onclick="checkNumber()">Check Number</button>
|
| 35 |
+
|
| 36 |
+
<div id="result"></div>
|
| 37 |
+
|
| 38 |
+
<script>
|
| 39 |
+
async function checkNumber() {
|
| 40 |
+
const code = document.getElementById('countryCode').value;
|
| 41 |
+
const number = document.getElementById('phoneNumber').value;
|
| 42 |
+
|
| 43 |
+
const url = `https://eyecon.p.rapidapi.com/api/v1/search?code=${code}&number=${number}`;
|
| 44 |
+
|
| 45 |
+
const options = {
|
| 46 |
+
method: 'GET',
|
| 47 |
+
headers: {
|
| 48 |
+
'X-Rapidapi-Key': 'c899bb0edbmsh5f997f0c4db52b2p1e6df4jsn1cf32e4d985b',
|
| 49 |
+
'X-Rapidapi-Host': 'eyecon.p.rapidapi.com'
|
| 50 |
+
}
|
| 51 |
+
};
|
| 52 |
+
|
| 53 |
+
document.getElementById('result').innerText = '🔄 Checking...';
|
| 54 |
+
|
| 55 |
+
try {
|
| 56 |
+
const response = await fetch(url, options);
|
| 57 |
+
if (!response.ok) throw new Error('API Error');
|
| 58 |
+
|
| 59 |
+
const data = await response.json();
|
| 60 |
+
document.getElementById('result').innerText =
|
| 61 |
+
"✅ Response:\n" + JSON.stringify(data, null, 2);
|
| 62 |
+
} catch (error) {
|
| 63 |
+
document.getElementById('result').innerText =
|
| 64 |
+
"❌ Error:\n" + error.message;
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
</script>
|
| 68 |
+
</body>
|
| 69 |
+
</html>
|