Upload files to "/"

This commit is contained in:
2026-02-22 13:56:07 +00:00
parent ad6c1e751b
commit d684aa9974
5 changed files with 985 additions and 0 deletions

205
DEPLOYMENT.md Normal file
View File

@@ -0,0 +1,205 @@
# 🚀 DEPLOYMENT GUIDE - Adım Adım
## 📦 DOSYALARI GITHUB'A YÜKLE
### 1⃣ GitHub'da Yeni Repo Oluştur
1. https://github.com/new adresine git
2. Repository name: **xciptv-api** (ya da istediğin isim)
3.**Public** seç (ücretsiz için)
4. ❌ README ekleme (bizde zaten var)
5. **Create repository** tıkla
### 2⃣ Dosyaları Yükle
İki yöntem var:
#### Yöntem A: GitHub Web'den (KOLAY ✅)
1. Yeni oluşturduğun repo sayfasında:
2. **"uploading an existing file"** linkine tıkla
3. Tüm dosyaları sürükle-bırak:
- api_secured.php
- login.html
- panel.html
- config.php
- index.php
- vercel.json
- composer.json
- .gitignore
- README.md
4. Commit message: "Initial commit"
5. **Commit changes** tıkla
#### Yöntem B: Git ile (Terminal)
```bash
# Dosyaların olduğu klasöre git
cd /path/to/xciptv-deploy
# Git başlat
git init
# Dosyaları ekle
git add .
# Commit
git commit -m "Initial commit"
# GitHub'a bağla (değiştir: USERNAME ve REPO_NAME)
git remote add origin https://github.com/USERNAME/REPO_NAME.git
# Push et
git branch -M main
git push -u origin main
```
---
## 🚀 VERCEL'E DEPLOY ET
### 1⃣ Vercel'e Git
1. https://vercel.com/new adresine git
2. **"Import Git Repository"** tıkla
### 2⃣ GitHub Repo'nu Seç
1. GitHub hesabını bağla (ilk seferse)
2. Listeden **xciptv-api** repo'sunu seç
3. **Import** tıkla
### 3⃣ Deploy Ayarları
```
Framework Preset: Other
Root Directory: ./
Build Command: (boş bırak)
Output Directory: (boş bırak)
Install Command: (boş bırak)
```
### 4⃣ Deploy!
**Deploy** butonuna tıkla ve bekle (30-60 saniye).
### 5⃣ URL'ini Al
Deploy bitince sana URL verecek:
```
https://xciptv-api-xxxxx.vercel.app
```
Bu URL'i kopyala! ✅
---
## 🧪 TEST ET
### 1⃣ Admin Panel
Tarayıcıda aç:
```
https://xciptv-api-xxxxx.vercel.app/login.html
```
Giriş yap:
- Username: **admin**
- Password: **admin123**
### 2⃣ API Test
Terminal'de test et:
```bash
# Token al
curl "https://xciptv-api-xxxxx.vercel.app/api_secured.php?action=get_token&api_key=myapp_v1_secret_key_2024"
```
Response gelirse **BAŞARILI!** 🎉
---
## ⚙️ ŞİFRE DEĞİŞTİR (ÖNEMLİ!)
### 1⃣ Yeni Şifre Oluştur
Bu PHP kodunu çalıştır:
```php
<?php
echo password_hash('YeniSifren123', PASSWORD_BCRYPT);
?>
```
Çıktı:
```
$2y$10$abcdefghijklmnopqrstuvwxyz...
```
### 2⃣ api_secured.php'yi Düzenle
GitHub'daki `api_secured.php` dosyasını aç → Edit:
```php
$SECURITY_CONFIG = [
'admin_username' => 'admin', // 👈 İstersen değiştir
'admin_password' => '$2y$10$abc...', // 👈 Yeni hash'i yapıştır
];
```
**Commit changes** → Vercel otomatik yeniden deploy eder (1 dk)
---
## 🎯 APK'YA BAĞLA
APK'da kullanacağın URL:
```
https://xciptv-api-xxxxx.vercel.app/api_secured.php
```
### Token Al:
```
?action=get_token&api_key=myapp_v1_secret_key_2024
```
### Config Çek:
```
?action=get_config&token=ALDGIN_TOKEN
```
---
## 🆘 SORUN ÇÖZME
### "500 Internal Server Error"
Vercel'de PHP çalışmıyorsa:
1. `vercel.json` dosyası var mı kontrol et
2. Repo'nun root'unda olmalı
### "404 Not Found"
URL'i doğru yazdığından emin ol:
```
✅ https://xxx.vercel.app/login.html
❌ https://xxx.vercel.app/login
```
### Şifre Çalışmıyor
Yeni hash oluştur ve güncelle:
```bash
php -r "echo password_hash('admin123', PASSWORD_BCRYPT);"
```
---
## 📞 Takıldın mı?
Geri gel, birlikte hallederiz! 💪

17
README.md Normal file
View File

@@ -0,0 +1,17 @@
# XC IPTV API - Secured Panel
## 🚀 Quick Start
1. Admin Panel: `login.html`
2. Default Login: admin / admin123
3. API Endpoint: `api_secured.php`
## 🔐 Security
- Change password in `api_secured.php`
- Update API keys
- Configure in `config.php`
## 📖 Documentation
See full docs in repository.

5
index.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
// Redirect to login
header('Location: login.html');
exit;
?>

310
login.html Normal file
View File

@@ -0,0 +1,310 @@
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Login - XC IPTV Panel</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.login-container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
padding: 50px 40px;
width: 100%;
max-width: 400px;
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.logo {
text-align: center;
margin-bottom: 40px;
}
.logo-icon {
font-size: 64px;
margin-bottom: 10px;
}
.logo h1 {
font-size: 24px;
color: #2c3e50;
margin-bottom: 5px;
}
.logo p {
color: #7f8c8d;
font-size: 14px;
}
.form-group {
margin-bottom: 25px;
}
.form-group label {
display: block;
margin-bottom: 10px;
color: #2c3e50;
font-weight: 600;
font-size: 14px;
}
.form-group input {
width: 100%;
padding: 15px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 14px;
transition: all 0.3s;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.btn-login {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-transform: uppercase;
letter-spacing: 1px;
}
.btn-login:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.btn-login:active {
transform: translateY(0);
}
.btn-login:disabled {
background: #95a5a6;
cursor: not-allowed;
transform: none;
}
.alert {
padding: 12px 15px;
border-radius: 8px;
margin-bottom: 20px;
font-size: 14px;
display: none;
}
.alert-error {
background: #fee;
color: #c33;
border: 1px solid #fcc;
}
.alert-success {
background: #efe;
color: #3c3;
border: 1px solid #cfc;
}
.remember-me {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 20px;
}
.remember-me input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
.remember-me label {
font-size: 14px;
color: #7f8c8d;
cursor: pointer;
}
.footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e0e0e0;
}
.footer p {
color: #95a5a6;
font-size: 12px;
}
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255,255,255,.3);
border-radius: 50%;
border-top-color: white;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="login-container">
<div class="logo">
<div class="logo-icon">🔐</div>
<h1>Admin Panel</h1>
<p>XC IPTV Management System</p>
</div>
<div id="alertBox" class="alert"></div>
<form id="loginForm">
<div class="form-group">
<label for="username">👤 Kullanıcı Adı</label>
<input
type="text"
id="username"
name="username"
placeholder="Kullanıcı adınızı girin"
required
autocomplete="username"
>
</div>
<div class="form-group">
<label for="password">🔒 Şifre</label>
<input
type="password"
id="password"
name="password"
placeholder="Şifrenizi girin"
required
autocomplete="current-password"
>
</div>
<div class="remember-me">
<input type="checkbox" id="remember" name="remember">
<label for="remember">Beni hatırla</label>
</div>
<button type="submit" class="btn-login" id="loginBtn">
Giriş Yap
</button>
</form>
<div class="footer">
<p>© 2024 XC IPTV Panel. Tüm hakları saklıdır.</p>
<p style="margin-top: 10px; font-size: 11px;">
<strong>Varsayılan Giriş:</strong><br>
Username: admin | Password: admin123
</p>
</div>
</div>
<script>
const loginForm = document.getElementById('loginForm');
const loginBtn = document.getElementById('loginBtn');
const alertBox = document.getElementById('alertBox');
// Show alert
function showAlert(message, type = 'error') {
alertBox.textContent = message;
alertBox.className = `alert alert-${type}`;
alertBox.style.display = 'block';
setTimeout(() => {
alertBox.style.display = 'none';
}, 5000);
}
// Login form submit
loginForm.addEventListener('submit', async (e) => {
e.preventDefault();
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Disable button
loginBtn.disabled = true;
loginBtn.innerHTML = '<span class="loading"></span> Giriş yapılıyor...';
try {
const response = await fetch('api_secured.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: `action=login&username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
});
const data = await response.json();
if (data.status === 'success') {
showAlert('✅ Giriş başarılı! Yönlendiriliyorsunuz...', 'success');
setTimeout(() => {
window.location.href = data.redirect || 'panel.html';
}, 1000);
} else {
showAlert('❌ ' + (data.message || 'Giriş başarısız!'), 'error');
loginBtn.disabled = false;
loginBtn.textContent = 'Giriş Yap';
}
} catch (error) {
showAlert('❌ Bağlantı hatası! Lütfen tekrar deneyin.', 'error');
loginBtn.disabled = false;
loginBtn.textContent = 'Giriş Yap';
}
});
// Auto-focus username
document.getElementById('username').focus();
// Enter key support
document.getElementById('password').addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
loginForm.dispatchEvent(new Event('submit'));
}
});
</script>
</body>
</html>

448
panel.html Normal file
View File

@@ -0,0 +1,448 @@
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XC IPTV Panel - Portal Yönetimi</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
background: white;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
font-size: 28px;
margin-bottom: 10px;
}
.header p {
opacity: 0.8;
font-size: 14px;
}
.content {
padding: 30px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 30px;
}
.section {
background: #f8f9fa;
border-radius: 8px;
padding: 25px;
border: 1px solid #e0e0e0;
}
.section h2 {
font-size: 18px;
margin-bottom: 20px;
color: #2c3e50;
border-bottom: 2px solid #667eea;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #555;
font-size: 14px;
}
.form-group input,
.form-group select {
width: 100%;
padding: 12px 15px;
border: 2px solid #e0e0e0;
border-radius: 6px;
font-size: 14px;
transition: all 0.3s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.portal-box {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 15px;
border: 2px solid #e0e0e0;
position: relative;
}
.portal-box.active {
border-color: #27ae60;
background: #f0fff4;
}
.portal-box h3 {
font-size: 16px;
margin-bottom: 15px;
color: #2c3e50;
}
.portal-status {
position: absolute;
top: 15px;
right: 15px;
padding: 5px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.portal-status.active {
background: #27ae60;
color: white;
}
.portal-status.inactive {
background: #e74c3c;
color: white;
}
.btn {
padding: 12px 25px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}
.btn-success {
background: #27ae60;
color: white;
}
.btn-danger {
background: #e74c3c;
color: white;
}
.checkbox-group {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
}
.checkbox-item {
display: flex;
align-items: center;
gap: 8px;
}
.checkbox-item input[type="checkbox"] {
width: 18px;
height: 18px;
}
.api-url {
background: #2c3e50;
color: white;
padding: 15px;
border-radius: 6px;
font-family: 'Courier New', monospace;
font-size: 13px;
margin-top: 20px;
word-break: break-all;
}
.copy-btn {
background: #3498db;
color: white;
border: none;
padding: 8px 15px;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
font-size: 12px;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin-top: 20px;
}
.stat-box {
background: white;
padding: 20px;
border-radius: 8px;
text-align: center;
border: 2px solid #e0e0e0;
}
.stat-value {
font-size: 32px;
font-weight: bold;
color: #667eea;
}
.stat-label {
font-size: 12px;
color: #666;
margin-top: 5px;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>📺 XC IPTV Panel Yönetimi</h1>
<p>appsnscripts Style - Multi Portal Manager</p>
</div>
<div class="content">
<!-- APP SETTINGS -->
<div class="section">
<h2>📱 App Settings</h2>
<div class="form-group">
<label>App Name</label>
<input type="text" value="MAGTV Android Player" id="appName">
</div>
<div class="form-group">
<label>Customer ID Number</label>
<input type="text" value="v2000" id="customerId">
</div>
<div class="form-group">
<label>App Expiry</label>
<select id="expiry">
<option value="LIFETIME" selected>LIFETIME</option>
<option value="2025-12-31">2025-12-31</option>
<option value="2026-12-31">2026-12-31</option>
</select>
</div>
<div class="form-group">
<label>Developer Name</label>
<input type="text" value="Ayris.Dev" id="developerName">
</div>
<div class="form-group">
<label>Developer Contact</label>
<input type="url" value="https://ayris.dev" id="developerContact">
</div>
<div class="form-group">
<label>Backup URL (API Endpoint)</label>
<input type="url" value="https://hc28.otttrun.com/api3/" id="backupUrl">
</div>
<button class="btn btn-primary" onclick="saveAppSettings()">💾 Kaydet</button>
</div>
<!-- PORTAL SETTINGS -->
<div class="section" style="grid-column: span 2;">
<h2>🌐 Portal Settings</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;">
<!-- Portal 1 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 1</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 1">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://hdd.inoon.uk:8080">
</div>
</div>
<!-- Portal 2 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 2</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 2">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://hdd.inoon.uk:8080">
</div>
</div>
<!-- Portal 3 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 3</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 3">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://imagson.site:8080">
</div>
</div>
<!-- Portal 4 -->
<div class="portal-box">
<span class="portal-status inactive">INACTIVE</span>
<h3>Portal 4</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" placeholder="Portal 4 Name">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" placeholder="http://example.com:8080">
</div>
</div>
<!-- Portal 5 -->
<div class="portal-box">
<span class="portal-status inactive">INACTIVE</span>
<h3>Portal 5</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" placeholder="Portal 5 Name">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" placeholder="http://example.com:8080">
</div>
</div>
</div>
<button class="btn btn-success" onclick="savePortals()" style="margin-top: 20px;">💾 Portalları Kaydet</button>
</div>
<!-- UI CONTROL -->
<div class="section">
<h2>🎨 UI Control</h2>
<div class="form-group">
<label>Show Live TV Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
<div class="form-group">
<label>Show VOD Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
<div class="form-group">
<label>Show Series Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
</div>
<!-- API INFO -->
<div class="section">
<h2>🔗 API Information</h2>
<div class="stats">
<div class="stat-box">
<div class="stat-value">3</div>
<div class="stat-label">Active Portals</div>
</div>
<div class="stat-box">
<div class="stat-value"></div>
<div class="stat-label">License Status</div>
</div>
</div>
<div class="api-url" id="apiUrl">
https://yourdomain.com/api/app.php
</div>
<button class="copy-btn" onclick="copyApiUrl()">📋 Kopyala</button>
<button class="btn btn-primary" onclick="testApi()" style="width: 100%; margin-top: 15px;">
🧪 API'yi Test Et
</button>
</div>
</div>
</div>
<script>
function saveAppSettings() {
alert('✅ App ayarları kaydedildi!');
}
function savePortals() {
alert('✅ Portal ayarları kaydedildi!');
}
function copyApiUrl() {
const url = document.getElementById('apiUrl').textContent;
navigator.clipboard.writeText(url);
alert('📋 API URL kopyalandı!');
}
function testApi() {
const apiUrl = document.getElementById('apiUrl').textContent;
window.open(apiUrl, '_blank');
}
</script>
</body>
</html>