I have the following code on example1.com:
<?php
setcookie('_ch' , base64_encode($file) , time() + (60) , '/');
header("Location: http://example2.com/");
exit();
And on example2.com:
<?php
if (!isset($_COOKIE['_ch'])){
echo error::noocookie();
exit();
}
The problem I face is that the if
statement is always true. How can I access the cookie from example2.com?