Reputation: 13
I want to create permanent cookie with ever cookie but when i run ever cookie program on localhost (Php wamp server) it does not create any cookie and following error is displayed
Not Found
The requested URL /php/evercookie_etag.php was not found on this server.
Not Found
The requested URL /php/evercookie_cache.php was not found on this server.
I have downloaded it from this link http://github.com/samyk/evercookie
I want to create a permanent cookie so that i can recognize the system on which i run my web page below is my code, Please help to sort out my issue, thanks in advance....
<html>
<head>
<script type="text/javascript" src="js/swfobject-2.2.min.js"></script>
<script type="text/javascript" src="js/evercookie.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script>
//var ec = new evercookie();
var ec = new evercookie({
baseurl: '/test', http://localhost/test
asseturi: '/assets', http://localhost/test/assets
phpuri: '/php' http://localhost/test/php
});
ec.set("id", "12345");
ec.get("id", function(value) { alert("Cookie value is " + value) });
function getCookie(best_candidate, all_candidates)
{
alert("The retrieved cookie is: " + best_candidate + "\n" +
"You can see what each storage mechanism returned " +
"by looping through the all_candidates object.");
for (var item in all_candidates)
document.write("Storage mechanism " + item +
" returned " + all_candidates[item] + " votes<br>");
}
ec.get("id", getCookie);
</script>
</head>
</html>
Upvotes: 0
Views: 1295
Reputation: 11
Are you sure that your baseurl var is '/test' ? For example with the github source, it will be :
var ec = new evercookie({
baseurl: '/evercookie-master',
asseturi: '/assets',
phpuri: '/php'
});
Upvotes: 1