📂 File Browser

//CreateCraft
🌙 Dark Mode
🎯 Quick Launch:

📁 Directories

📁 includes/ 🔓 Open
📁 vendor/ 🔓 Open
📁 videos/ 🔓 Open

📄 Files

🐘 about.php
▶ Open 📄 View Source
🐘 demo.php
▶ Open 📄 View Source
🐘 factions.php
▶ Open 📄 View Source
🐘 index.php
▶ Open 📄 View Source
🐘 php.php
▶ Open 📄 View Source
🎨 style.css
▶ Open 📄 View Source
🎨 styles.css
▶ Open 📄 View Source

📄 Source: demo.php

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Minecraft Demo Site</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>

<?php
// Simple PHP variable to customize content
$page_title = "Welcome to My Minecraft World";
$current_hour = date('H'); // Gets server hour (0-23)

// Dynamic greeting based on time of day
if ($current_hour < 12) {
    $greeting = "Good morning!";
} elseif ($current_hour < 18) {
    $greeting = "Good afternoon!";
} else {
    $greeting = "Good evening!";
}

// Array of Minecraft facts (PHP demo)
$minecraft_facts = [
    "Creepers were created by accident!",
    "The Ender Dragon has 200 health points.",
    "There are over 100 different biomes.",
    "A day in Minecraft is 20 minutes real time.",
    "The Nether was added in 2010."
];

// Pick a random fact
$random_fact = $minecraft_facts[array_rand($minecraft_facts)];
?>

<!-- Video Background -->
<div class="video-background">
    <video autoplay muted loop playsinline poster="fallback.jpg">
        <source src="videos/timelapse.mp4" type="video/mp4">
        Your browser does not support HTML5 video.
    </video>
</div>

<!-- Content Overlay -->
<div class="content">
    <header>
        <h1><?php echo $page_title; ?></h1>
        <p class="greeting"><?php echo $greeting; ?></p>
    </header>

    <main>
        <div class="card">
            <h2>Did you know?</h2>
            <p><?php echo $random_fact; ?></p>
        </div>

        <div class="card">
            <h2>Server Info</h2>
            <ul>
                <li>Server time: <?php echo date('H:i:s'); ?></li>
                <li>PHP version: <?php echo phpversion(); ?></li>
                <li>Date: <?php echo date('F j, Y'); ?></li>
            </ul>
        </div>

        <div class="card">
            <h2>Quick Links</h2>
            <nav>
                <a href="?page=home">Home</a>
                <a href="?page=about">About</a>
                <a href="?page=gallery">Gallery</a>
            </nav>
        </div>

        <?php
        // Simple page routing (PHP demo)
        if (isset($_GET['page'])) {
            $page = $_GET['page'];
            echo '<div class="card">';
            echo "<h3>You are viewing: " . htmlspecialchars($page) . "</h3>";
            echo "<p>This content changes based on the URL parameter!</p>";
            echo '</div>';
        }
        ?>
    </main>

    <footer>
        <p>© <?php echo date('Y'); ?> My Minecraft Demo | Built with PHP</p>
    </footer>
</div>

</body>
</html>
← Back