Is there any way for me to tell the script which domain to look at? Like the one that makes the call?
If it is the "wrong" domain then the script won't even receive the cookie.
The client's browser won't send it. This is out of your control.