if (!isset($_COOKIE['cookie']))
{
setcookie("cookie","test",time()+5);
header("Location:$PHP_SELF");
}
if (isset($_COOKIE['cookie']))
{
echo "Browser anda sudah mendukung Cookie";
exit;
}
else
{
echo "Browser anda belum mendukung Cookie";
exit;
}
----- Original Message -----
From: "Yanu Widodo" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, August 04, 2006 2:43 AM
Subject: [linux-programming] Tentang Cookie di Apache
> Dear Linux expert,
>
> Saya ada script untuk ngetes cokie seperti ini :
>
> # cat /var/www/html/latihan/tescokie.php
> <?php
> $tes_cookie="Tes Browser";
> if ($QUERY_STRING != $tes_cookie)
> {
> setcookie("cookieku",$tes_cookie);
> header("Location:$PHP_SELF?$tes_cookie");
> }
> if($cookieku==$tes_cookie)
> echo("Browser anda sudah mendukung Cookie");
> else
> echo("Browser anda belum mendukung Cookie");
>
> ?>
>
>
> Namun hasilnya kok "Redirection limit for this URL exceeded. Unable to
> load the requested page"
>
> kira-kira napa ya ?! apakah ada salah konfigurasi apache ?
> atau memang ada yg perlu dikonfigurasi di apache ?!
>
> fyi : saya make apache bawaan redhat 9.0
>
>
> Trims
>
> yanu
>
> --
> Berhenti langganan: [EMAIL PROTECTED]
> Arsip dan info: http://linux.or.id/milis
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006
>
>
--
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis