Abdfah commited on
Commit
9110e66
·
verified ·
1 Parent(s): f49c3d6

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +69 -19
index.html CHANGED
@@ -1,19 +1,69 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>