Need expert with javascript and cookies
Budget: $10 – $30 USD
I have a page that sets a cookie
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<script type="text/javascript">
document.cookie = "cp_id=<?php print @$_REQUEST['id']; ?>;domain=.cpmktg.net;path=/;secure";
window.location.href="<?php print urldecode(@$_REQUEST['url']); ?>"
</script>
</body>
</html>
Then I want to read the same cookie from a different domain with a script tag
<script src="https://www.cpmktg.net/check.js"></script>
Which includes
var cp_subid = a('cp_id') ?? 'none';
alert(cp_subid);
function a(a){var c=[],d=document.cookie.split(";");a=RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var b=0;b<d.length;b++){var e=d[b].match(a);e&&c.push(e[1])}return c}
THE PROBLEM IS THAT document.cookie does not exits
I need to fix this so that I can read my own domain cookies from another page
If you have a solution I will pay you.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<script type="text/javascript">
document.cookie = "cp_id=<?php print @$_REQUEST['id']; ?>;domain=.cpmktg.net;path=/;secure";
window.location.href="<?php print urldecode(@$_REQUEST['url']); ?>"
</script>
</body>
</html>
Then I want to read the same cookie from a different domain with a script tag
<script src="https://www.cpmktg.net/check.js"></script>
Which includes
var cp_subid = a('cp_id') ?? 'none';
alert(cp_subid);
function a(a){var c=[],d=document.cookie.split(";");a=RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var b=0;b<d.length;b++){var e=d[b].match(a);e&&c.push(e[1])}return c}
THE PROBLEM IS THAT document.cookie does not exits
I need to fix this so that I can read my own domain cookies from another page
If you have a solution I will pay you.