Re: cookie + ie5
| From: | Toby Butzon | Date: | Fri, 15 Dec 2000 01:53:23 +0000 |
| Subject: | Re: cookie + ie5 | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30434@lists.php.net to get a copy of this message | ||
Really? The PHP manual suggests that that's a completely acceptible way to
create cookies... see http://php.net/manual/function.setcookie.php
Otherwise, it seems to work for me...
One thing though,
str_replace(".","",$REMOTE_ADDR) + "renePR"
probably doesn't have the behavior you'd expect. "renePR" is typecasted to
an int because of the + and it ends up being 0. Try replacing it with this:
str_replace(".","",$REMOTE_ADDR) . "renePR"
Toby Butzon
[ criticism spurs improvement ]
----- Original Message -----
From: "Richard Lynch" <richard@zend.com>
To: <php-general@lists.php.net>
Sent: Thursday, December 14, 2000 8:24 PM
Subject: Re: [PHP] cookie + ie5
: Because [ and ] are not valid characters in a Cookie name.
:
: ----- Original Message -----
: From: "andre" <viva@mcnon.com>
: Newsgroups: php.general
: Sent: Thursday, December 14, 2000 8:51 AM
: Subject: [PHP] cookie + ie5
:
:
: hi,
:
: can someone tell me why this cookie isnt set in ie 5
:
:
: =======================================
:
: <?
: if($myName && $myCode) {
:
: $myLoginOK=0;
: if ((trim($myName) == "rene") && (trim($myCode) == "rs#t2"))
: {$myLoginOK=1;};
:
: if ($myLoginOK == 1) {
: // md5en der ip + "renePR"
: $iceberg_temp = md5(str_replace(".","",$REMOTE_ADDR) + "renePR");
: setcookie("myTicket[myICEBERG]",$iceberg_temp,time()+600,"/");
: echo "<html><head><title>VIVA - Online</title>";
: echo "<meta http-equiv=\"refresh\"
content=\"0;URL=doaz.php3\">";
: echo "</head>";
: echo "<body bgcolor=\"#FFFFFF\" >";
: }
: else {
: echo "<html><title>VIVA - Online</title>";
: echo "<body bgcolor=\"#FFFFFF\" >";
: include("no_login.tpl");
: }
: } else
:
:
: echo "<html><title>VIVA - Online</title>";
: echo "<body bgcolor=\"#FFFFFF\" >";
:
: include ("login.tpl");
: }
:
: echo "</body></html>";
:
: ?>
:
: ==============================================
:
:
: its working fine with netscape all versions
:
: its working fine from a apache server on a redhat 6.2 box
:
: but its strange on a cobald raq3
:
:
: any ideas ?
:
:
:
: thanks
:
: andreas
:
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
: For additional commands, e-mail: php-general-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net
:
: