Re: Checking if cookies can be set.

From: Date: Fri, 25 Aug 2000 23:17:44 +0000
Subject: Re: Checking if cookies can be set.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13758@lists.php.net to get a copy of this message
Hi James, To be tecnical, all browsers accept cookies (they are just HTTP headers that you are sending), but here is _an_ answer. You can set a "test_cookie", for example, set_cookie('test_cookie','ok'); then on the next page, test to see if $test_cookie == 'ok'; You can also test HTTP_USER_AGENTS for browsers that you want to send cookies to, but that doesn't insure that they haven't turned off the ability to store, send back cookie informations. So, setting a test cookie and then testing for it is the best way that I have found so far. It is (AFAIKT) the only 100% way of knowing for sure. -jeremy brand _______________________________________________________________________ GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9 _ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more __ On Fri, 25 Aug 2000, James Atkinson wrote: > Date: Fri, 25 Aug 2000 16:04:02 -0700 > From: James Atkinson <james.atkinson@ebox.ca> > To: php-general@lists.php.net > Subject: [PHP] Checking if cookies can be set. > > Is there anyway to check if a client can accept cookies befor actually sending > the cookie? > > -- > James Atkinson > ----------------------------------------------------------------- > James Atkinson 100world > Technical Developer 512-1529 West 6th Avenue > phone: +1-604-637-8122 Vancouver, BC, V6J 1R1 > fax: +1-604-742-1770 Canada > email: james.atkinson@100world.com http://www.100world.com > > +---------------------------------------------------------------+ > | This message may contain confidential and/or privileged | > | information. If you are not the addressee or authorized to | > | receive this for the addressee, you must not use, copy, | > | discolse or take any action based on this message or any | > | information herein. If you have received this message in | > | error, please advise the sender immediately by reply e-mail | > | and delete this message. Thank you for you cooperation | > +---------------------------------------------------------------+ > > -- > 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 (#13758) next »