Click to See Complete Forum and Search --> : how to get value of cookie variable of one website in another website?
roshnishanoor
December 13th, 2003, 01:40 AM
hi all
I want to pass the address of a page in one website to a page another website. For the I have used cookies. but do any one know how to get a cookie value of one website in another website? is there such a scope for cookies?
thank you
phpbrian
December 22nd, 2003, 03:41 AM
If I am understanding you well enough, you want to pass data from one website to another with cookies. If so, you can't. You can, but you can't. Let me try to explain this better. If you want to pass data from one page to another page within the same domain, that is easily done. A cookie does have a scope and it is limited to the current domain and subdomain. When a cookie is set, you can specify where you want it to be seen. For example, with PHP you can set an argument to allow it to be seen by a certain subdomain or all subdomains on a domain name. I am not sure if you can set it to work with multiple domains. I don't think so. Can someone verify that for me?
JohnDavidHanna
January 13th, 2004, 09:28 PM
I confirm your statement.
It is easy enough with server side scripting, read a cookie - store the data - send the data to another cookie .
If you are trying to pass data or read data from one client to another client you can not.
:wave:
roshnishanoor
January 13th, 2004, 11:20 PM
hello phpbrain,
i had found this to be working according to my problem :
i have created a cookie variable in the asp page of my local site.
i can access the value of this cookie variable in a php page of my the hosted website .
Sam Hobbs
January 15th, 2004, 02:22 PM
There is not a direct solution to this problem because it is a major privacy issue. If any website could read cookies from any other website then that would make cookies very insecure compared to what they are. There are SpyWare cookies that are removed by SpyWare removal utilities. I don't know how the SpyWare works but I assume they use relatively advanced ways to gather data. Privacy advocates don't want websites to be able to store cookies that can be read by other websites, even if the creating website gives the other website permission to do so. It is the owner of the computer that should be in control of those descisions.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.