forked from TheSmartDevs/SmartUserInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
476 lines (452 loc) · 23.6 KB
/
status.html
File metadata and controls
476 lines (452 loc) · 23.6 KB
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Telegram Info API - A futuristic interface to explore Telegram users, bots, channels, and groups.">
<meta property="og:title" content="Telegram Info API Dashboard">
<meta property="og:description" content="Discover Telegram entity details with a cutting-edge, interactive API dashboard.">
<title>Telegram Info API - Cosmic Dashboard</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome for Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400&display=swap" rel="stylesheet">
<!-- Three.js for 3D Effects -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<style>
body {
font-family: 'Roboto', sans-serif;
background: linear-gradient(180deg, #0a0a23 0%, #1e1e5f 100%);
color: #e0e0ff;
overflow-x: hidden;
position: relative;
}
.hero {
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><filter id="glow"><feGaussianBlur stdDeviation="3.5" result="coloredBlur"/><feMerge><feMergeNode in="coloredBlur"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><rect width="100%" height="100%" fill="none" filter="glow"/></svg>'), linear-gradient(135deg, #1e1e5f, #3b82f6);
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
padding: 150px 0;
text-align: center;
}
h1, h2 {
font-family: 'Orbitron', sans-serif;
text-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
}
.navbar {
background: rgba(10, 10, 35, 0.8);
backdrop-filter: blur(10px);
position: sticky;
top: 0;
z-index: 50;
}
.nav-link {
transition: color 0.3s, transform 0.3s;
}
.nav-link:hover {
color: #a5b4fc;
transform: scale(1.1);
}
.input-panel {
background: rgba(255, 255, 255, 0.1);
border: 1px solid #3b82f6;
border-radius: 15px;
padding: 20px;
box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
transition: transform 0.3s;
}
.input-panel:hover {
transform: translateY(-5px);
}
.entity-badge {
font-size: 0.75rem;
padding: 4px 10px;
border-radius: 12px;
margin: 0 5px;
transition: transform 0.2s;
}
.entity-badge:hover {
transform: scale(1.1);
}
.response-card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid #3b82f6;
border-radius: 10px;
padding: 20px;
animation: fadeIn 0.5s ease-in;
}
.loader {
border: 4px solid #ffffff;
border-top: 4px solid #3b82f6;
border-radius: 50%;
width: 30px;
height: 30px;
animation: spin 1s linear infinite;
display: none;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.suggestion {
cursor: pointer;
transition: background 0.2s, transform 0.2s;
}
.suggestion:hover {
background: rgba(59, 130, 246, 0.3);
transform: translateX(10px);
}
.social-icons a {
font-size: 2rem;
margin: 0 15px;
transition: transform 0.3s, filter 0.3s;
}
.social-icons a:hover {
transform: scale(1.2);
filter: drop-shadow(0 0 10px currentColor);
}
#canvas {
position: fixed;
top: 0;
left: 0;
z-index: -1;
opacity: 0.3;
}
pre {
background: #1e1e5f !important;
color: #a5b4fc;
padding: 16px;
border-radius: 8px;
font-family: 'Courier New', Courier, monospace;
white-space: pre-wrap;
border: 1px solid #3b82f6;
box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
pre strong {
color: #60a5fa;
}
pre .string { color: #34d399; }
pre .number { color: #f59e0b; }
pre .boolean { color: #f472b6; }
pre .null { color: #94a3b8; }
pre .key { color: #60a5fa; }
select#entityType {
background: rgba(10, 10, 35, 0.8);
border: 1px solid #3b82f6;
color: #e0e0ff;
backdrop-filter: blur(5px);
transition: all 0.3s;
}
select#entityType:focus {
background: rgba(10, 10, 35, 0.9);
box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
select#entityType option {
background: #1e1e5f;
color: #e0e0ff;
padding: 8px;
}
select#entityType option:hover {
background: #3b82f6;
color: #ffffff;
}
</style>
</head>
<body>
<!-- 3D Particle Background -->
<canvas id="canvas"></canvas>
<!-- Navigation -->
<nav class="navbar py-4">
<div class="container mx-auto px-4 flex justify-between items-center">
<a href="#" class="text-2xl font-bold text-white flex items-center">
<i class="fab fa-telegram-plane text-blue-500 mr-2"></i>
SmartDev Info API
</a>
<div class="flex items-center space-x-6">
<a href="#status" class="nav-link text-white">Status</a>
<a href="#docs" class="nav-link text-white">Docs</a>
<a href="#developer" class="nav-link text-white">Developer</a>
<a href="https://t.me/TheSmartDev" target="_blank" class="nav-link text-white">Updates</a>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="hero">
<div class="container mx-auto px-4">
<h1 class="text-5xl font-bold mb-4">Smart Telegram Info API</h1>
<p class="text-xl mb-6">Dive into the cosmos of Telegram data with a stellar API experience.</p>
<div class="flex justify-center items-center space-x-2">
<span class="status-indicator bg-gray-500 w-3 h-3 rounded-full" id="statusIndicator"></span>
<span id="statusText" class="text-lg">Checking API Server Status...</span>
</div>
<a href="#status" class="inline-block bg-blue-500 text-white px-6 py-3 rounded-full mt-4 hover:bg-blue-600 transition">Try Now</a>
</div>
</header>
<!-- Check Entity Section -->
<section id="status" class="container mx-auto px-4 py-16">
<h2 class="text-3xl font-bold text-center mb-8">Get Telegram Entinites</h2>
<div class="input-panel max-w-2xl mx-auto relative">
<div class="flex flex-wrap gap-3 mb-4">
<input type="text" id="entityInput" class="flex-grow p-3 rounded-lg bg-transparent border border-blue-500 text-white focus:outline-none focus:ring-2 focus:ring-blue-300 placeholder-gray-400" placeholder="Enter username, ID, or Telegram link (e.g., @username)">
<select id="entityType" class="p-3 rounded-lg">
<option value="all">All Entities</option>
<option value="user">User</option>
<option value="bot">Bot</option>
<option value="channel">Channel</option>
<option value="group">Group</option>
<option value="supergroup">Supergroup</option>
</select>
<button onclick="fetchEntityInfo()" class="relative bg-blue-500 text-white px-6 py-3 rounded-full hover:bg-blue-600 transition">
<span id="checkButtonText">Probe</span>
<div id="loader" class="loader"></div>
</button>
</div>
<div class="flex flex-wrap gap-2 justify-center">
<span class="entity-badge bg-blue-500 text-white">User</span>
<span class="entity-badge bg-green-500 text-white">Bot</span>
<span class="entity-badge bg-yellow-500 text-black">Channel</span>
<span class="entity-badge bg-purple-500 text-white">Group</span>
<span class="entity-badge bg-red-500 text-white">Supergroup</span>
</div>
<div id="suggestions" class="absolute w-full bg-gray-800 bg-opacity-90 rounded-lg mt-2 max-h-48 overflow-y-auto hidden z-10"></div>
</div>
<div id="responseContainer" class="response-card max-w-2xl mx-auto mt-6 hidden"></div>
</section>
<!-- Documentation Section -->
<section id="docs" class="container mx-auto px-4 py-16">
<h2 class="text-3xl font-bold text-center mb-8">API Entire Docs</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="response-card p-6">
<h3 class="text-xl font-semibold mb-2">GET /info</h3>
<p>Retrieve data on Telegram entities (users, bots, channels, groups).</p>
<pre class="bg-gray-900 p-4 rounded-lg text-sm"><code class="language-json"><span class="key">"request"</span>: <span class="string">"curl -X GET \"http://localhost:5000/info?username=@username\""</span>,
<span class="key">"response_user"</span>: {
<span class="key">"success"</span>: <span class="boolean">true</span>,
<span class="key">"type"</span>: <span class="string">"user"</span>,
<span class="key">"id"</span>: <span class="number">123456789</span>,
<span class="key">"first_name"</span>: <span class="string">"John"</span>,
<span class="key">"last_name"</span>: <span class="string">"Doe"</span>,
<span class="key">"username"</span>: <span class="string">"@username"</span>,
<span class="key">"dc_id"</span>: <span class="number">2</span>,
<span class="key">"dc_location"</span>: <span class="string">"AMS, Amsterdam, Netherlands, NL"</span>,
<span class="key">"is_premium"</span>: <span class="boolean">true</span>,
<span class="key">"is_verified"</span>: <span class="boolean">false</span>,
<span class="key">"is_bot"</span>: <span class="boolean">false</span>,
<span class="key">"flags"</span>: <span class="string">"Clean"</span>,
<span class="key">"status"</span>: <span class="string">"Online"</span>,
<span class="key">"account_created"</span>: <span class="string">"January 01, 2020"</span>,
<span class="key">"account_age"</span>: <span class="string">"5 years, 6 months, 28 days"</span>,
<span class="key">"links"</span>: {
<span class="key">"android"</span>: <span class="string">"tg://openmessage?user_id=123456789"</span>,
<span class="key">"ios"</span>: <span class="string">"tg://user?id=123456789"</span>,
<span class="key">"permanent"</span>: <span class="string">"tg://user?id=123456789"</span>
}
},
<span class="key">"response_channel"</span>: {
<span class="key">"success"</span>: <span class="boolean">true</span>,
<span class="key">"type"</span>: <span class="string">"channel"</span>,
<span class="key">"id"</span>: <span class="number">-100123456789</span>,
<span class="key">"title"</span>: <span class="string">"Example Channel"</span>,
<span class="key">"username"</span>: <span class="string">"@ExampleChannel"</span>,
<span class="key">"dc_id"</span>: <span class="number">4</span>,
<span class="key">"dc_location"</span>: <span class="string">"STO, Stockholm, Sweden, SE"</span>,
<span class="key">"members_count"</span>: <span class="number">10000</span>,
<span class="key">"description"</span>: <span class="string">"Welcome to our channel!"</span>,
<span class="key">"links"</span>: {
<span class="key">"join"</span>: <span class="string">"t.me/ExampleChannel"</span>,
<span class="key">"permanent"</span>: <span class="string">"t.me/ExampleChannel"</span>
}
},
<span class="key">"response_error"</span>: {
<span class="key">"success"</span>: <span class="boolean">false</span>,
<span class="key">"error"</span>: <span class="string">"Entity not found or access denied"</span>
}
</code></pre>
</div>
<div class="response-card p-6">
<h3 class="text-xl font-semibold mb-2">GET /health</h3>
<p>Check the API's operational status.</p>
<pre class="bg-gray-900 p-4 rounded-lg text-sm"><code class="language-json"><span class="key">"request"</span>: <span class="string">"curl -X GET \"http://localhost:5000/health\""</span>,
<span class="key">"response"</span>: {
<span class="key">"success"</span>: <span class="boolean">true</span>,
<span class="key">"status"</span>: <span class="string">" API is running smoothly ✅"</span>,
<span class="key">"api_info"</span>: {
<span class="key">"name"</span>: <span class="string">"Telegram Info API"</span>,
<span class="key">"version"</span>: <span class="string">"1.0.0"</span>,
<span class="key">"description"</span>: <span class="string">"Advanced Telegram entity information retrieval system"</span>,
<span class="key">"uptime_check"</span>: <span class="string">"2025-06-29 14:37:00"</span>,
<span class="key">"bot_status"</span>: <span class="string">"Pyrofork Client: connected"</span>,
<span class="key">"features"</span>: [
<span class="string">"User & Bot Information"</span>,
<span class="string">"Channel & Group Details"</span>,
<span class="string">"Account Age Estimation"</span>,
<span class="string">"Data Center Location"</span>,
<span class="string">"Premium Status Detection"</span>,
<span class="string">"Verification Status"</span>,
<span class="string">"Real-time Status Tracking"</span>
]
}
}
</code></pre>
</div>
</div>
</section>
<!-- Developer Section -->
<section id="developer" class="container mx-auto px-4 py-16 text-center">
<h2 class="text-3xl font-bold mb-8">The Architect Of This Supreme API</h2>
<div class="response-card p-6 max-w-md mx-auto">
<i class="fas fa-user text-blue-500 text-4xl mb-3"></i>
<h3 class="text-xl font-semibold">Abir Arafat Chawdhury</h3>
<p>Crafted with passion by @ISmartCoder</p>
<p>Join the <a href="https://t.me/TheSmartDev" target="_blank" class="text-blue-400 hover:text-blue-300">API Updates Channel</a> for best updates!</p>
<a href="https://t.me/TheSmartDev" class="inline-block bg-blue-500 text-white px-6 py-3 rounded-full mt-4 hover:bg-blue-600 transition">Join Now</a>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 bg-opacity-80 py-8 text-center">
<p class="text-white">Built with ❤️ by <a href="https://t.me/ISmartCoder" target="_blank" class="text-blue-400 hover:text-blue-300"><i class="fa-brands fa-telegram"></i> @ISmartCoder</a></p>
<p class="text-white">Join our community at <a href="https://t.me/TheSmartDev" target="_blank" class="text-blue-400 hover:text-blue-300"><i class="fa-brands fa-telegram"></i> @TheSmartDev</a></p>
<p class="text-white">© 2025 TheSmartDev Info API</p>
<div class="social-icons mt-4">
<a href="https://t.me/TheSmartDev" target="_blank"><i class="fa-brands fa-telegram text-white-500"></i></a>
<a href="https://x.com/abirxdhackz" target="_blank"><i class="fa-brands fa-twitter text-white-500"></i></a>
<a href="https://github.com/TheSmartDevs" target="_blank"><i class="fa-brands fa-github text-white"></i></a>
<a href="https://facebook.com/abirxdhackz" target="_blank"><i class="fa-brands fa-facebook-f text-white-600"></i></a>
<a href="https://instagram.com/abirxdhackz" target="_blank"><i class="fa-brands fa-instagram text-white-500"></i></a>
<a href="https://youtube.com/@abirxdhackz" target="_blank"><i class="fa-brands fa-youtube text-white-500"></i></a>
</div>
</footer>
<script>
// Three.js Particle Background
const canvas = document.getElementById('canvas');
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
camera.position.z = 5;
const particles = new THREE.Group();
for (let i = 0; i < 200; i++) {
const geometry = new THREE.SphereGeometry(0.02, 16, 16);
const material = new THREE.MeshBasicMaterial({ color: 0x3b82f6 });
const particle = new THREE.Mesh(geometry, material);
particle.position.set(
(Math.random() - 0.5) * 10,
(Math.random() - 0.5) * 10,
(Math.random() - 0.5) * 10
);
particles.add(particle);
}
scene.add(particles);
function animate() {
requestAnimationFrame(animate);
particles.rotation.y += 0.002;
renderer.render(scene, camera);
}
animate();
// Check API Status
async function checkApiStatus() {
try {
const response = await fetch('/health');
const data = await response.json();
const statusIndicator = document.getElementById('statusIndicator');
const statusText = document.getElementById('statusText');
if (data.success && data.api_info.bot_status.includes('connected')) {
statusIndicator.classList.remove('bg-gray-500');
statusIndicator.classList.add('bg-green-500');
statusText.textContent = 'API is online and operational';
} else {
statusIndicator.classList.remove('bg-gray-500');
statusIndicator.classList.add('bg-red-500');
statusText.textContent = 'API is offline';
}
} catch (error) {
document.getElementById('statusIndicator').classList.remove('bg-gray-500');
document.getElementById('statusIndicator').classList.add('bg-red-500');
document.getElementById('statusText').textContent = 'Failed to connect to API';
}
}
// Fetch Entity Information
async function fetchEntityInfo() {
const username = document.getElementById('entityInput').value;
const responseContainer = document.getElementById('responseContainer');
const suggestions = document.getElementById('suggestions');
const loader = document.getElementById('loader');
const checkButtonText = document.getElementById('checkButtonText');
if (!username) {
responseContainer.innerHTML = '<div class="bg-yellow-500 bg-opacity-20 text-white p-4 rounded-lg">Please enter a username or ID</div>';
responseContainer.classList.remove('hidden');
suggestions.classList.add('hidden');
return;
}
loader.style.display = 'block';
checkButtonText.style.display = 'none';
try {
const response = await fetch(`/info?username=${encodeURIComponent(username)}`);
const data = await response.json();
responseContainer.classList.remove('hidden');
suggestions.classList.add('hidden');
if (data.success) {
responseContainer.innerHTML = `
<h3 class="text-lg font-semibold mb-2 flex items-center">
Entity Data
<span class="entity-badge bg-${data.type === 'user' ? 'blue' : data.type === 'bot' ? 'green' : data.type === 'channel' ? 'yellow' : data.type === 'group' ? 'purple' : 'red'}-500 text-${data.type === 'channel' ? 'black' : 'white'} ml-2">${data.type.charAt(0).toUpperCase() + data.type.slice(1)}</span>
</h3>
<pre class="bg-gray-900 p-4 rounded-lg text-sm"><code class="language-json">${JSON.stringify(data, null, 2)
.replace(/"([^"]+)":/g, '<span class="key">"$1":</span>')
.replace(/: "([^"]+)"/g, ': <span class="string">"$1"</span>')
.replace(/: (\d+)/g, ': <span class="number">$1</span>')
.replace(/: (true|false)/g, ': <span class="boolean">$1</span>')
.replace(/: null/g, ': <span class="null">null</span>')}</code></pre>
`;
} else {
responseContainer.innerHTML = `<div class="bg-red-500 bg-opacity-20 text-white p-4 rounded-lg">${data.error}</div>`;
}
} catch (error) {
responseContainer.classList.remove('hidden');
responseContainer.innerHTML = `<div class="bg-red-500 bg-opacity-20 text-white p-4 rounded-lg">Error: Failed to fetch information</div>`;
} finally {
loader.style.display = 'none';
checkButtonText.style.display = 'inline';
}
}
// Real-time Suggestions with Icons
const entityInput = document.getElementById('entityInput');
const suggestions = document.getElementById('suggestions');
const mockSuggestions = [
{ name: '@Telegram', type: 'channel' },
{ name: '@ISmartCoder', type: 'user' },
{ name: '@TheSmartDev', type: 'channel' },
{ name: '@ExampleBot', type: 'bot' },
{ name: '@ExampleGroup', type: 'group' }
];
entityInput.addEventListener('input', () => {
const query = entityInput.value.toLowerCase();
if (query.length > 0) {
const filteredSuggestions = mockSuggestions.filter(s => s.name.toLowerCase().includes(query));
suggestions.innerHTML = filteredSuggestions.map(s => `
<div class="suggestion p-3 flex items-center text-white" onclick="entityInput.value = '${s.name}'; fetchEntityInfo(); suggestions.classList.add('hidden');">
<i class="${s.type === 'user' ? 'fas fa-user' : s.type === 'bot' ? 'fas fa-robot' : 'fas fa-users'} mr-2 text-blue-400"></i>
${s.name} <span class="entity-badge bg-${s.type === 'user' ? 'blue' : s.type === 'bot' ? 'green' : s.type === 'channel' ? 'yellow' : s.type === 'group' ? 'purple' : 'red'}-500 text-${s.type === 'channel' ? 'black' : 'white'}">${s.type.charAt(0).toUpperCase() + s.type.slice(1)}</span>
</div>
`).join('');
suggestions.classList.remove('hidden');
} else {
suggestions.classList.add('hidden');
}
});
// Handle Enter key press
entityInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
fetchEntityInfo();
}
});
// Initialize
document.addEventListener('DOMContentLoaded', checkApiStatus);
</script>
</body>
</html>