I know that if the cookie was made from my domain I can just use something like this
<html>
<body>
<?php
if (isset($_COOKIE["user"]))
echo "Welcome " . $_COOKIE["user"] . "!<br />";
else
echo "Welcome guest!<br />";
?>
</body>
</html>
what if the cookie was from different domain and I don’t know what is the cookie name or don’t have control on it lets assume that website http://cookieprovider.com if you visit you will get a cookie store for one week then if the visitors comes back to my website and I want to see if they have the cookie set on their browser or not if not send them back or give them a message warn that the cookie isn’t set yet and need to go back again to refresh or whatever and when they have the cookie will give them a welcome message and so on.
will this be possible?
if not so that I can see other solution just wanted to make sure.
Ali,
For obvious security reasons, you can’t read a cookie that belongs to another domain. You can do it across sub-domains though.