JAYNESTV commited on
Commit
b7f11be
·
verified ·
1 Parent(s): fea42ac

Delete all.php

Browse files
Files changed (1) hide show
  1. all.php +0 -77
all.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * all.php — JAYNES MAX TV (v3.2-split, in-process)
4
- * Awali iliita part1.php...part5.php kupitia curl (self-HTTP), lakini
5
- * baadhi ya hosting (mf. Hugging Face Spaces) zinaelekeza (301) hizo
6
- * self-requests kwenye proxy ambayo haziitiki vizuri -> timeout.
7
- *
8
- * Sasa: inaita runBatch() MOJA KWA MOJA (function call ya ndani ya
9
- * process hiihii), bila HTTP yoyote ya ndani. Haraka zaidi, salama
10
- * kwa hosting yoyote.
11
- */
12
-
13
- header('Content-Type: application/json; charset=UTF-8');
14
- header('Access-Control-Allow-Origin: *');
15
- header('Access-Control-Allow-Methods: GET, OPTIONS');
16
- if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { http_response_code(204); exit; }
17
-
18
- @ini_set('display_errors', '0');
19
- error_reporting(E_ERROR);
20
-
21
- while (ob_get_level() > 0) { ob_end_flush(); }
22
- ob_implicit_flush(true);
23
- ignore_user_abort(true);
24
-
25
- require __DIR__ . '/kraudius_core.php';
26
-
27
- $source = trim($_GET['source'] ?? 'kraudius');
28
-
29
- // Ranges zilezile za part1..part5 (kwa taarifa/debug tu)
30
- $ranges = [
31
- 'part1' => [1, 11],
32
- 'part2' => [12, 22],
33
- 'part3' => [23, 33],
34
- 'part4' => [34, 44],
35
- 'part5' => [45, 52],
36
- ];
37
-
38
- $t0 = microtime(true);
39
- $channels = [];
40
- $okCount = 0;
41
- $failCount = 0;
42
- $fb1Count = 0;
43
- $dupCount = 0;
44
- $partsDebug = [];
45
-
46
- foreach ($ranges as $label => [$from, $to]) {
47
- $result = runBatch($from, $to, $source);
48
-
49
- $channels = array_merge($channels, $result['channels'] ?? []);
50
- $okCount += $result['ok_count'] ?? 0;
51
- $failCount += $result['fail_count'] ?? 0;
52
- $fb1Count += $result['with_fallback1'] ?? 0;
53
- $dupCount += $result['same_url_count'] ?? 0;
54
-
55
- $partsDebug[$label] = [
56
- 'range' => $result['range'] ?? "$from-$to",
57
- 'elapsed_ms' => $result['elapsed_ms'] ?? null,
58
- ];
59
- }
60
-
61
- usort($channels, fn($a, $b) => ($a['channel'] ?? 0) <=> ($b['channel'] ?? 0));
62
-
63
- echo json_encode([
64
- 'success' => true,
65
- 'version' => 'v3.2-split-inprocess',
66
- 'source' => $source === 'all' ? 'KraudiusTV + LiveBlog365' : sourceLabel($source),
67
- 'range' => '1-52',
68
- 'total' => count($channels),
69
- 'ok_count' => $okCount,
70
- 'fail_count' => $failCount,
71
- 'with_fallback1' => $fb1Count,
72
- 'same_url_count' => $dupCount,
73
- 'fetched_at' => date('Y-m-d H:i:s'),
74
- 'elapsed_ms' => (int)((microtime(true) - $t0) * 1000),
75
- 'parts_debug' => $partsDebug,
76
- 'channels' => $channels,
77
- ], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);