<?php
// Database connection (use your credentials)
$servername = "localhost";
$username = "u111585590_cookies";
$password = "Cookies@076";
$dbname = "u111585590_db_cookies";

$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT web FROM cookies";
$result = $conn->query($sql);

$cookies = [];
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $cookies[] = $row["web"];
    }
}

$conn->close();

echo json_encode($cookies);
?>
