🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux in-mum-web1643.main-hosting.eu 5.14.0-687.46.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 09:03:19 EDT 2026 x86_64
👤 User: u621169360 (621169360)
🐘 PHP: 8.2.33
🚫 Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail

💻 Terminal

📁 /home/u621169360/domains/agriexpertt.com/public_html
$

📄 blog.php

📁 Path: /home/u621169360/domains/agriexpertt.com/public_html/mobile/Flutter/blog.php
📊 Size: 865 B
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

// Enable CORS headers
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST");
header("Access-Control-Allow-Headers: Content-Type");

require_once 'db.php';

// Query the database to get all active districts
$query = "SELECT * FROM blog WHERE status = 'Active'";
$stmt = $pdo->prepare($query);
$stmt->execute();

// Fetch all matching districts
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);

if ($data) {
    // If districts are found
    $response = [
        'success' => true,
        'message' => 'Retrieved',
        'datas' => $data  // Return all districts in an array
    ];
} else {
    // No districts found
    $response = [
        'success' => false,
        'message' => 'No active Blogs found',
    ];
}

// Send the response as JSON
header('Content-Type: application/json');
echo json_encode($response);

?>
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨