Jump to content


This topic is now archived and is closed to further replies.


Cant read cookie

Recommended Posts


I cant read a cookie under the following senario:

1) I write a cookie at the URL: http://www.mydomain.com/writecookie.php
2) at http://www.anotherdomain.com/integration.html there is something like that:
img src="http://www.mydomain.com/readcookie.php" that reads the cookie and update some stuff at my db.

if I go directlly to http://www.mydomain.com/readcookie.php, the cookie is being read.
if I go to http://www.anotherdomain.com/integration.html, the cookie is not being read.
I added an alert to http://www.mydomain.com/readcookie.php that display the domain is runs on and it returned

Any idea what am I doing wrong??


Share this post

Link to post
Share on other sites
Cookies are client side... But!, they are set with a domain... So you need to set it for the other domain... Ive never tried to use cross domain cookies so i dont know if thats possible though...

Share this post

Link to post
Share on other sites
I know that they are set with a domain, but as I explained I run the PHP script on the same domain as I wrote it.
the PHP script is just being called from a page that is not on the same domain but it run on the same server as it was wrriten.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.