Admin Login

prepare("SELECT id FROM satta_results WHERE game_name = ? AND result_date = CURDATE()"); $checkStmt->execute([$game]); if ($checkStmt->fetch()) { $stmt = $pdo->prepare("UPDATE satta_results SET result = ?, result_time = ? WHERE game_name = ? AND result_date = CURDATE()"); $stmt->execute([$result, $time, $game]); $message = "Result updated successfully!"; } else { $stmt = $pdo->prepare("INSERT INTO satta_results (game_name, result, result_time, result_date) VALUES (?, ?, ?, CURDATE())"); $stmt->execute([$game, $result, $time]); $message = "Result added successfully!"; } } elseif (isset($_POST['add_game'])) { $name = $_POST['new_game_name']; $time = $_POST['game_time']; try { $stmt = $pdo->prepare("INSERT INTO games (name, time_slot) VALUES (?, ?)"); $stmt->execute([$name, $time]); $message = "Game added successfully!"; } catch(PDOException $e) { $message = "Game already exists!"; $messageType = 'error'; } } elseif (isset($_POST['scrape_data'])) { $scrapeUrl = trim($_POST['scrape_url']); if (!empty($scrapeUrl) && filter_var($scrapeUrl, FILTER_VALIDATE_URL)) { $scraper = new SattaScraper($pdo); $result = $scraper->scrape($scrapeUrl); if ($result['success']) { $message = $result['message']; } else { $message = $result['message']; $messageType = 'error'; } } else { $message = "Please enter a valid URL!"; $messageType = 'error'; } } elseif (isset($_POST['import_paste'])) { $pastedContent = trim($_POST['pasted_content']); if (!empty($pastedContent)) { $scraper = new SattaScraper($pdo); $result = $scraper->parseFromPastedContent($pastedContent, 'pasted_content'); if ($result['success']) { $message = $result['message']; } else { $message = $result['message']; $messageType = 'error'; } } else { $message = "Please paste some content!"; $messageType = 'error'; } } elseif (isset($_POST['import_historical'])) { $histUrl = trim($_POST['historical_url']); if (!empty($histUrl) && filter_var($histUrl, FILTER_VALIDATE_URL)) { $gameCodeMap = [ 'desawar' => 'DSWR', 'dswr' => 'DSWR', 'disawar-gold' => 'DISA', 'disa' => 'DISA', 'disawar-gold-satta' => 'DISA', 'shri-ganesh' => 'SRGN', 'srgn' => 'SRGN', 'sg' => 'SRGN', 'faridabad' => 'FRBD', 'frbd' => 'FRBD', 'ghaziabad' => 'GZBD', 'gzbd' => 'GZBD', 'gali' => 'GALI', 'delhi-bazar' => 'DLBZ', 'dlbz' => 'DLBZ', 'delhi-morning' => 'DLMN', 'dlmn' => 'DLMN', 'delhi-time' => 'DLTM', 'dltm' => 'DLTM' ]; $parsedUrl = parse_url($histUrl); $pathParts = explode('/', trim($parsedUrl['path'] ?? '', '/')); $gameName = $pathParts[0] ?? ''; parse_str($parsedUrl['query'] ?? '', $queryParams); $histMonth = intval($queryParams['month'] ?? 0); $histYear = intval($queryParams['year'] ?? 0); $targetGame = $gameCodeMap[strtolower($gameName)] ?? strtoupper(substr($gameName, 0, 4)); if (!empty($targetGame) && $histMonth > 0 && $histYear > 0) { $scraper = new SattaScraper($pdo); $result = $scraper->scrapeHistoricalChart($histUrl, $targetGame, $histMonth, $histYear); if ($result['success']) { $message = $result['message'] . " (Game: {$targetGame}, Month: {$histMonth}/{$histYear})"; } else { $message = $result['message']; $messageType = 'error'; } } else { $message = "Could not extract game/month/year from URL. Format: https://satta-king-fast.com/game-name/satta-result-chart/code/?month=01&year=2020"; $messageType = 'error'; } } else { $message = "Please enter a valid URL!"; $messageType = 'error'; } } elseif (isset($_POST['import_historical_paste'])) { $pastedChart = trim($_POST['historical_paste_content']); $pasteUrl = trim($_POST['paste_url'] ?? ''); $gameCodeMap = [ 'desawar' => 'DSWR', 'dswr' => 'DSWR', 'disawar-gold' => 'DISA', 'disa' => 'DISA', 'disawar-gold-satta' => 'DISA', 'shri-ganesh' => 'SRGN', 'srgn' => 'SRGN', 'sg' => 'SRGN', 'faridabad' => 'FRBD', 'frbd' => 'FRBD', 'ghaziabad' => 'GZBD', 'gzbd' => 'GZBD', 'gali' => 'GALI', 'delhi-bazar' => 'DLBZ', 'dlbz' => 'DLBZ', 'delhi-morning' => 'DLMN', 'dlmn' => 'DLMN', 'delhi-time' => 'DLTM', 'dltm' => 'DLTM' ]; $targetGame = ''; $histMonth = 0; $histYear = 0; if (!empty($pasteUrl) && filter_var($pasteUrl, FILTER_VALIDATE_URL)) { $parsedUrl = parse_url($pasteUrl); $pathParts = explode('/', trim($parsedUrl['path'] ?? '', '/')); $gameName = $pathParts[0] ?? ''; parse_str($parsedUrl['query'] ?? '', $queryParams); $histMonth = intval($queryParams['month'] ?? 0); $histYear = intval($queryParams['year'] ?? 0); $targetGame = $gameCodeMap[strtolower($gameName)] ?? strtoupper(substr($gameName, 0, 4)); } if (!empty($pastedChart) && !empty($targetGame) && $histMonth > 0 && $histYear > 0) { $scraper = new SattaScraper($pdo); $result = $scraper->parseHistoricalChartFromPaste($pastedChart, $targetGame, $histMonth, $histYear); if ($result['success']) { $message = $result['message'] . " (Game: {$targetGame}, Month: {$histMonth}/{$histYear})"; } else { $message = $result['message']; $messageType = 'error'; } } else { $message = "Please paste chart content and provide valid URL with game/month/year info!"; $messageType = 'error'; } } elseif (isset($_POST['update_page'])) { $pageId = (int)$_POST['page_id']; $content = $_POST['content']; $metaTitle = $_POST['meta_title']; $metaDesc = $_POST['meta_description']; $stmt = $pdo->prepare("UPDATE site_pages SET content = ?, meta_title = ?, meta_description = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?"); $stmt->execute([$content, $metaTitle, $metaDesc, $pageId]); $message = "Page updated successfully!"; } elseif (isset($_POST['update_settings'])) { $analyticsCode = $_POST['google_analytics_code'] ?? ''; $googleVerify = $_POST['meta_verification_google'] ?? ''; $bingVerify = $_POST['meta_verification_bing'] ?? ''; $stmt = $pdo->prepare("UPDATE site_settings SET setting_value = ?, updated_at = CURRENT_TIMESTAMP WHERE setting_key = ?"); $stmt->execute([$analyticsCode, 'google_analytics_code']); $stmt->execute([$googleVerify, 'meta_verification_google']); $stmt->execute([$bingVerify, 'meta_verification_bing']); $message = "Settings saved successfully!"; } elseif (isset($_POST['save_news_post'])) { $postId = isset($_POST['post_id']) ? intval($_POST['post_id']) : 0; $title = trim($_POST['title']); $slug = trim($_POST['slug']); $excerpt = trim($_POST['excerpt']); $content = $_POST['content']; $metaTitle = trim($_POST['meta_title']); $metaDescription = trim($_POST['meta_description']); $metaKeywords = trim($_POST['meta_keywords']); $status = $_POST['status']; $featuredImage = trim($_POST['featured_image']); if (empty($slug)) { $slug = strtolower(preg_replace('/[^a-z0-9]+/', '-', strtolower($title))); $slug = trim($slug, '-'); } if ($postId > 0) { $slugCheck = $pdo->prepare("SELECT COUNT(*) FROM news_posts WHERE slug = ? AND id != ?"); $slugCheck->execute([$slug, $postId]); if ($slugCheck->fetchColumn() > 0) { $slug .= '-' . time(); } $stmt = $pdo->prepare("UPDATE news_posts SET title = ?, slug = ?, excerpt = ?, content = ?, featured_image = ?, meta_title = ?, meta_description = ?, meta_keywords = ?, status = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?"); $stmt->execute([$title, $slug, $excerpt, $content, $featuredImage, $metaTitle, $metaDescription, $metaKeywords, $status, $postId]); if ($status === 'published') { $checkPublished = $pdo->prepare("SELECT published_at FROM news_posts WHERE id = ?"); $checkPublished->execute([$postId]); $existingPublished = $checkPublished->fetchColumn(); if (empty($existingPublished)) { $pdo->prepare("UPDATE news_posts SET published_at = CURRENT_TIMESTAMP WHERE id = ?")->execute([$postId]); } } $message = "Post updated successfully!"; } else { $slugCheck = $pdo->prepare("SELECT COUNT(*) FROM news_posts WHERE slug = ?"); $slugCheck->execute([$slug]); if ($slugCheck->fetchColumn() > 0) { $slug .= '-' . time(); } $publishedAt = $status === 'published' ? date('Y-m-d H:i:s') : null; $stmt = $pdo->prepare("INSERT INTO news_posts (title, slug, excerpt, content, featured_image, meta_title, meta_description, meta_keywords, status, published_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->execute([$title, $slug, $excerpt, $content, $featuredImage, $metaTitle, $metaDescription, $metaKeywords, $status, $publishedAt]); $message = "Post created successfully!"; } } elseif (isset($_POST['delete_news_post'])) { $postId = intval($_POST['post_id']); $pdo->prepare("DELETE FROM news_posts WHERE id = ?")->execute([$postId]); $message = "Post deleted successfully!"; } elseif (isset($_POST['publish_daily_update'])) { $publishDate = date('Y-m-d'); $dateFormatTitle = date('j M Y', strtotime($publishDate)); $dateFormatUrl = strtolower(date('j-F-Y', strtotime($publishDate))); $gamesWithResults = $pdo->query(" SELECT DISTINCT game_name FROM satta_results WHERE result_date = CURDATE() AND result IS NOT NULL AND result != '' ORDER BY game_name ")->fetchAll(PDO::FETCH_COLUMN); if (count($gamesWithResults) == 0) { $message = "No results available for today to publish!"; $messageType = 'error'; } else { $publishedCount = 0; $skippedCount = 0; foreach ($gamesWithResults as $gameName) { $slugGame = strtolower(str_replace(' ', '-', $gameName)); $slugGame = preg_replace('/[^a-z0-9\-]/', '', $slugGame); $existingPost = $pdo->prepare("SELECT id FROM posts WHERE post_date = ? AND games_included = ?"); $existingPost->execute([$publishDate, $gameName]); $existing = $existingPost->fetch(PDO::FETCH_ASSOC); if ($existing) { $skippedCount++; continue; } $title = "Today {$gameName} Satta Result {$dateFormatTitle}"; $baseSlug = "today-{$slugGame}-satta-result-{$dateFormatUrl}"; $baseSlug = preg_replace('/-+/', '-', $baseSlug); $slug = $baseSlug; $slugCheck = $pdo->prepare("SELECT COUNT(*) FROM posts WHERE slug = ?"); $slugCheck->execute([$slug]); if ($slugCheck->fetchColumn() > 0) { $slug = $baseSlug . '-' . time(); } $metaDesc = "Check Today {$gameName} Satta Result for {$dateFormatTitle}. Get live {$gameName} result, chart, and fast updates. Today's {$gameName} Satta number."; $metaKeywords = "{$gameName} satta result, {$gameName} result {$dateFormatTitle}, {$gameName} satta result today, satta {$gameName}, {$gameName} chart, today {$gameName} satta"; $insertStmt = $pdo->prepare(" INSERT INTO posts (title, slug, meta_description, meta_keywords, games_included, post_date) VALUES (?, ?, ?, ?, ?, ?) "); $insertStmt->execute([$title, $slug, $metaDesc, $metaKeywords, $gameName, $publishDate]); $publishedCount++; } if ($publishedCount > 0) { $message = "{$publishedCount} game posts published successfully!"; if ($skippedCount > 0) { $message .= " ({$skippedCount} already existed)"; } } else { $message = "All game posts already published for today!"; $messageType = 'error'; } } } } $scraper = new SattaScraper($pdo); $scrapeLogs = $scraper->getLastScrapeLog(); $games = $pdo->query("SELECT * FROM games WHERE is_active = 1 ORDER BY time_slot")->fetchAll(PDO::FETCH_ASSOC); $todayResults = $pdo->query("SELECT * FROM satta_results WHERE result_date = CURDATE() ORDER BY result_time")->fetchAll(PDO::FETCH_ASSOC); $totalGames = $pdo->query("SELECT COUNT(*) FROM games WHERE is_active = 1")->fetchColumn(); $totalResults = $pdo->query("SELECT COUNT(*) FROM satta_results WHERE result_date = CURDATE()")->fetchColumn(); ?> Admin Panel - Satta King

'Dashboard', 'scrape' => 'Import Data', 'results' => 'Add/Update Result', 'games' => 'Manage Games', 'today' => "Today's Results", 'logs' => 'Scrape Logs', 'posts' => 'Daily Update Posts', 'news' => 'News Posts', 'ads' => 'Ad Management', 'pages' => 'Footer Pages', 'settings' => 'Settings' ]; echo $titles[$currentPage] ?? 'Dashboard'; ?>

🎮
Total Games
📊
Today's Results
🔄
Recent Imports

Recent Import Activity

Time Status Records Message

Import Historical Chart Data (Month Wise)

Just paste the URL - Game, Month, Year will be auto-detected from URL.

Example: https://satta-king-fast.com/shri-ganesh/satta-result-chart/sg/?month=01&year=2020

URL format: /game-name/.../.../?month=MM&year=YYYY

Paste Historical Chart HTML

If URL import fails (Cloudflare), paste the chart table HTML directly. Provide the original URL for auto-detection of game/month/year.

Scrape Data from URL

Enter the URL and click Scrape. Today's data will be updated, historical data will be preserved.

Paste HTML Data

If URL scraping doesn't work (Cloudflare protection), paste the HTML table data directly from the website.

Add/Update Result

Add New Game

All Games ()

Game Name Time Slot

Today's Results ()

0): ?>
Game Result Time

No results added yet for today.

Scrape History

Time Status Records Message

No scrape logs yet.

query("SELECT * FROM posts ORDER BY post_date DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC); $todayGamesCount = $pdo->query("SELECT COUNT(DISTINCT game_name) FROM satta_results WHERE result_date = CURDATE() AND result IS NOT NULL AND result != ''")->fetchColumn(); ?>

Publish Daily Update Post

Click the button below to auto-generate and publish today's Satta King results post. Only games with results will be included.

Today's Stats:

Games with results:

Date:

Post will be created with full SEO including meta tags, keywords, and sitemap entry.

Published Posts

Date Game Views Action
View

No posts published yet. Click the button above to publish your first daily update.

Sitemap

Your sitemap is automatically generated and includes all published posts.

View Sitemap
prepare("UPDATE ad_placements SET ad_code = ?, is_active = ?, updated_at = CURRENT_TIMESTAMP WHERE placement_name = ?"); $updateAd->execute([$adCode, $isActive, $adName]); $message = "Ad placement updated successfully!"; } $adPlacements = $pdo->query("SELECT * FROM ad_placements ORDER BY placement_name")->fetchAll(PDO::FETCH_ASSOC); ?>

Ad Placements

Add your AdSense or custom ad code to each placement. Leave empty to disable.

Available Placements:

  • header_ad - Top of page (after header)
  • after_result - Below result tables
  • sidebar_ad - Sidebar area (desktop)
  • footer_ad - Before footer
  • between_posts - Between post listings

style="width: 18px; height: 18px;">
query("SELECT * FROM site_pages ORDER BY title")->fetchAll(PDO::FETCH_ASSOC); $editPageId = isset($_GET['edit']) ? (int)$_GET['edit'] : 0; $editPage = null; if ($editPageId > 0) { $editPageStmt = $pdo->prepare("SELECT * FROM site_pages WHERE id = ?"); $editPageStmt->execute([$editPageId]); $editPage = $editPageStmt->fetch(PDO::FETCH_ASSOC); } ?>

Edit Page:

Page title cannot be changed

Cancel

Footer Pages

Manage your website footer pages - About, Contact, Disclaimer, Privacy Policy, Terms & Conditions

Page Title URL Slug Last Updated Actions
/page/ Edit View
prepare("SELECT * FROM news_posts WHERE id = ?"); $editStmt->execute([intval($_GET['edit'])]); $editNewsPost = $editStmt->fetch(PDO::FETCH_ASSOC); } $isNewPost = isset($_GET['new']); $allNewsPosts = $pdo->query("SELECT * FROM news_posts ORDER BY created_at DESC")->fetchAll(PDO::FETCH_ASSOC); ?>

Leave empty to auto-generate from title

Enter full image URL or upload to /uploads/news/ folder

Use HTML tags: <h2>, <h3>, <p>, <img>, <a>, <ul>, <ol>, <li>, <strong>, <em>

SEO Settings

Cancel

All News Posts

+ Create New Post
0): ?>
Title Status Views Created Actions
Published Draft Edit View

📝

No news posts yet. Create your first post!

query("SELECT setting_key, setting_value FROM site_settings"); while ($row = $settingsQuery->fetch(PDO::FETCH_ASSOC)) { $settings[$row['setting_key']] = $row['setting_value']; } ?>

Google Analytics & Verification

Add your Google Analytics tracking code and verification meta tags for search engines.

Paste the complete Google Analytics or GTM script code. This will be added to all pages.

Enter only the content value from the Google verification meta tag

Enter only the content value from the Bing verification meta tag

SEO Tips

  • Submit your sitemap (/sitemap.xml) to Google Search Console
  • Add Google Analytics to track your website visitors
  • Enable all Ad Placements for maximum revenue
  • Publish Daily Updates regularly to keep content fresh
  • Complete all Footer Pages (About, Contact, Disclaimer, Privacy, Terms)