Mailinglisten-Archive |
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C0D4D7.0DB92AF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Wie kann ich in PHP feststellen ob der Browser Cookies akzeptiert?
getenv("HTTP_COOKIE") gibt mir immer NULL zurück egal ob ich Cookies
deaktiviert habe oder nicht..
Mfg
Manfred
<?
if(!$MODE=="test") {
// SetCookie("COOKIE","VALUE",time()+3600,"/",".domainname",0);
SetCookie("COOKIE","VALUE",time()+3600);
header("Location: main.php4?MODE=test");
exit();
}
if (!$COOKIE=="VALUE") {
$cooky = "<span class='kleinb'><font color='#CC0033'>Ihr System
akzeptiert jedoch keine Cookies. Bitte aktivieren Sie die Annahme von
Cookies!</font></span>";
}
?>
------=_NextPart_000_000A_01C0D4D7.0DB92AF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>Wie kann ich in PHP feststellen ob =
der Browser=20
Cookies akzeptiert?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>getenv("HTTP_COOKIE") gibt mir immer =
NULL zur=FCck=20
egal ob ich Cookies deaktiviert habe oder nicht..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Mfg</FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Manfred<SPAN =
class=3D395321518-04052001><FONT=20
color=3D#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D395321518-04052001></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D395321518-04052001><FONT=20
color=3D#0000ff><?<BR> if(!$MODE=3D=3D"test") =
{<BR> =20
//=20
=
SetCookie("COOKIE","VALUE",time()+3600,"/",".domainname",0);<BR> &nb=
sp;=20
=
SetCookie("COOKIE","VALUE",time()+3600);</FONT></SPAN></FONT></FONT=
></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D395321518-04052001><FONT=20
color=3D#0000ff> header("Location:=20
main.php4?MODE=3Dtest");<BR> exit();<BR> =20
}<BR> if (!$COOKIE=3D=3D"VALUE")=20
{<BR> $cooky =3D =
"<span=20
class=3D'kleinb'><font color=3D'#CC0033'>Ihr System =
akzeptiert jedoch=20
keine Cookies. Bitte aktivieren Sie die Annahme von=20
=
Cookies!</font></span>";<BR> }<BR>?></FONT> </SP=
AN></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_000A_01C0D4D7.0DB92AF0--
php::bar PHP Wiki - Listenarchive