Full working sameple to set a HTML cookie on site 1 and get the value of that cookie on site 2.
Code in zip [2.52 KB (2,590 bytes)]
Steps To Test
-
Go to make.php and set a cookie value (not required if your site already set a cookie on current browser profile)
-
Customize ws.php, change the secret to make it more secure, use https only to avoid snooping
-
Make your version of wstest.html and get.php. wstest.html makes a form to get the value, this can be done programmatically too
-
On site 1 where cookie is set, keep your ws.php, hit it from site 2 with correct secret and cookie name, it will make a form and post back to your specified page
-
Can make ws.php output a plain string or XML so it can be hit via ajax, then you do not need get.php
Example
Go to To get value from this page.