Cross domain cookie

<?php
setcookie("myCookie", 1, time() +50);
echo $myCookie."<br>";
?>

<!doctype html> 
<html>   
  <head> 
    <meta charset="UTF-8"> 
    <title>crossDomainCookie</title> 
  </head> 
<body>

<a href="http://dot.kr/x-test/crossDomainCookie.php">dot.kr</a><br>
<a href="http://www.dot.kr/x-test/crossDomainCookie.php">[COLOR="Red"]www[/COLOR].dot.kr</a><br>
<a href="http://subDomain2.dot.kr/x-test/crossDomainCookie.php">[COLOR="red"]subDomain2[/COLOR].dot.kr</a><br>
<a href="http://term.kr/x-test/crossDomainCookie.php">[COLOR="Red"]term[/COLOR].kr</a><br>

</body> 
</html>

The 4 links in the code above opens a same file.
But the cookie value doesn’t show when it clicks the link crossing the domain.

Is there anyway for making the cookie( or session or other global variables ) to work cross domain?

You can test it in http://dot.kr/x-test/crossDomainCookie.php

No, cookies can never be cross domain.
They can only exist in the same root domain (.root.tld [tld: com, net, org, etc]) and above

http://us.php.net/setcookie

domain

The domain that the cookie is available to. To make the cookie available on all subdomains of example.com (including example.com itself) then you’d set it to ‘.example.com’. Although some browsers will accept cookies without the initial ., » RFC 2109 requires it to be included. Setting the domain to ‘www.example.com’ or ‘.www.example.com’ will make the cookie only available in the www subdomain.