Here's the code in PHP:
$cookies_stat = false; if(setcookie("test", "test", time() + 360)) { if(isset($_COOKIE['test'])) { $cookie_stat = true; } }The general idea of the PHP code is first we create a cookie then we check if the cookie have the values that has been set on it. If the values are set then the cookies in the user's browser was enabled.
Here's the code in Javascript:
var cookies_stat = false; if (navigator.cookieEnabled == 0) { cookies_stat = true; }
No comments:
Post a Comment