( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/..//tmpr/../tmpr/../tmpr/../wowX/json/custom-fonts.php
<?php
// Database connection details
$host = 'localhost';
$dbname = 'thebrand';
$username = 'root';
$password = 'Pw4TheBrand!';

try {
    // Connect to the database
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $brand = $_GET['brand'];
    // Query to fetch font families
    $stmt = $pdo->query("SELECT file as family FROM myfonts where catalogid=$brand and isdisplay=1");

    // Fetch all results as an associative array
    $fonts = $stmt->fetchAll(PDO::FETCH_ASSOC);

    // Prepare the JSON structure
    $data = ["items" => $fonts];

    // Convert to JSON
    $json = json_encode($data, JSON_PRETTY_PRINT);

    // Output the JSON
    header('Content-Type: application/json');
    echo $json;
} catch (PDOException $e) {
    // Handle connection errors
    echo "Database error: " . $e->getMessage();
}
?>