Make a cookie that will be read from other site

Cookie Name
Cookie Value

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

  1. Go to make.php and set a cookie value (not required if your site already set a cookie on current browser profile)
  2. Customize ws.php, change the secret to make it more secure, use https only to avoid snooping
  3. Make your version of wstest.html and get.php. wstest.html makes a form to get the value, this can be done programmatically too
  4. 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
  5. 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.