cookie detection with PHP browser detection script
Status: New User - Welcome
Joined: 25 Mar 2008
Posts: 1
Reply Quote

I'm trying out the PHP browser detection script

The example on the above page returns the cookie state of the browser. I've tried to find an example of how this mght be achieved, but I can't find any clues. Am I missing something .. or is this unavailable in the free version? Can you help?

Thanks in advance
Back to top
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
Yes, you are missing something:

Sounds like you are looking for the system information script called 'Your Computer' offered here, which is a sample front end use of the primary php browser detection functions.

Things like cookies are not handled by the primary browser detection script, the output on the computer information box uses a mixture of javascript and php to grab cookie support.

It is not possible with php to both set and test a cookie on the same page load, you can EITHER set it, or test it.

Javascript, however, can do this, it can set then test. So the your computer box script uses javascript cookies as well, for the setting of the cookie, if I remember right, and to read (get) if the cookie is set on the client browser.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours