Re: WAP and cookies via PHP

From: Date: Mon, 24 Jul 2000 13:07:11 +0000
Subject: Re: WAP and cookies via PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7858@lists.php.net to get a copy of this message
Do wap browsers store cookies? Data Driven Design P.O. Box 1084 Holly Hill, FL 32125-1084 Phone : (904) - 226-8979 URL : http://www.datadrivendesign.com URL : http://www.rossidesigns.net ----- Original Message ----- From: "Jeff Schwartz" <jeff_schwartz@yahoo.com> To: "PHP List" <php-general@lists.php.net> Sent: Sunday, July 23, 2000 8:40 PM Subject: [PHP] WAP and cookies via PHP > I'm trying to get WAP to see the existing cookies on our site. What's > really confusing me is that my regular PHP page doesn't find the cookies > if I'm coming to it from a WAP page. > > I've tried to access the cookie value as the very first thing > PHP does, even before the WAP header is output. When the PHP page is > called from another HTML page it finds the cookie. But when coming from a > .wml page my PHP page can't find the cookie. > > Here's the code and I'd appreciate any suggestions: > > <?php > $cookie = $HTTP_COOKIE; > require("get_browser.php"); // check for WAP > if ($wap): > header("Content-type: text/vnd.wap.wml"); > echo("<?xml version=\"1.0\"?>\n"); > echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" > > \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n\n"); > > echo "<wml> > <card id=\"Home\" title=\"test\"> > <p>"; > endif; > if ($cookie): > echo "your name is $cookie"; > else: > echo "no cookie found"; > endif; > echo "</p> > </card> > </wml>"; > ?> > > Thanks, > > Jeff > > > > __________________________________________________ > Do You Yahoo!? > Get Yahoo! Mail - Free email you can access from anywhere! > http://mail.yahoo.com/ > > -- > 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 >

« previous php.general (#7858) next »