[Solved] How to detect a returning visitor, and redirect to a specific URL? [closed]

function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? “” : “; expires=”+exdate.toUTCString()); document.cookie=c_name + “=” + c_value; } gets cookie function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(“;”); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf(“=”)); y=ARRcookies[i].substr(ARRcookies[i].indexOf(“=”)+1); x=x.replace(/^\s+|\s+$/g,””); if (x==c_name) { return unescape(y); } } } if(getCookie(‘visited’)) { location.href=”https://stackoverflow.com/questions/13655941/redirecturl”; }else { setCookie(‘visited’,1,365); } tutorial for cookies … Read more

[Solved] Setting a PHP cookie value to be intentionally vulnerable

i looked at it again, try this: $cookie_name=”Authenticated”; // this checks if the value has been set already if (!isset($_GET[‘cookie_value’])) { // if no value is set, it defaults to 0 and displays the error message $cookie_value=0; $error = “You are not authorized to view this page!”; echo $error; } // Now here if the … Read more