AbyssalSwamp  ActivaUser
» Guest:  Register | Login | 冻结用户(激活) | Residents

RSS subscription to this AbyssalSwamp  

Previous thread Next thread
       
Title: COOKIE全数据显示  
  This topic was added by com at 2024-11-22 11:53 移动 
 
sky999
天山茗客



UID 181291
Digest 2
Points 10
Posts 3869
码币MB 2619 Code
黄金 0 Catty
钻石 884 Pellet
Permissions 10
Register 2020-11-28
Status offline
COOKIE全数据显示

<!DOCTYPE html>
<html>
<head>
    <title>Cookie Reader</title>
</head>
<body>
    <h1>Cookie Reader</h1>

    <?php
    // 检查是否存在任何Cookie
    if (!empty($_COOKIE)) {
        echo "<h2>Cookie Values:</h2>";
        echo "<ul>";

        // 遍历所有的Cookie并显示名称和值
        foreach ($_COOKIE as $name => $value) {
            // 转义Cookie的名称和值
            $safeName = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
            $safeValue = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');

            // 显示Cookie的名称和值
            echo "<li>$safeName: $safeValue</li>";
        }

        echo "</ul>";
    } else {
        echo "<p>No cookies found.</p>";
    }
    ?>

</body>
</html>




CAFFZ.com
2023-7-2 13:10#1
View profile  Blog  Send a short message  Top
       


  Printable version | Recommend to a friend | Subscribe to topic | Favorite topic  


 


All times are GMT+8, and the current time is 2025-6-27 15:13 Clear informations ->sessions/cookies - Contact Us - CAFFZ - ZAKE