CookieCheck 1.1

CookieCheck is a basic PHP script for checking whether a visitor has cookies enabled or not.
CookieCheck is a basic PHP script for checking whether a visitor has cookies enabled or not. Its design makes it simple to include into an existing script: just include the source file and call the check function.

The script preserves the values of any GET or POST information sent to your script, so it does not require any major modifications to your original script.

Usage Instructions

CookieCheck code is stored in the file cookiecheck.php. It consists of the public function cc_cookie_cutter() and a handful of private helper functions. There are a handful of configuration options that can be manipulated directly in the file by modifying the define(...) statements marked in the source code.

To use CookieCheck, simply include it into your existing script and then run the cc_cookie_cutter() function:

...
include_once(cookiecheck.php);
if (cc_cookie_cutter() == FALSE) {
// Cookies are disabled
echo 'Sorry, you do not have cookies enabled. Please enable them and reload this page';
exit();
}
// Execution only reaches this line if cookies are enabled
...


Note that this script sends headers, and so the cc_cookie_cutter() function should be called before any output (including whitespace) has been sent to the browser. This may necessitate the use of PHP's output buffering functions.

What's New in This Release:

This release includes some minor bug-fixes and enhancements. It also rolls in the v1.0 security-fix-1 patch which fixed a potentially serious security vulnerability with the default session save path.

last updated on:
May 18th, 2008, 12:43 GMT
price:
FREE!
developed by:
Jath Pala
homepage:
code.google.com
license type:
MIT/X Consortium License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating 10

3.4/5
 

0/5

Add your review!

SUBMIT