CodeIgniter Forums
Can't get cookie while processing an image request? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Can't get cookie while processing an image request? (/thread-9259.html)



Can't get cookie while processing an image request? - El Forum - 06-18-2008

[eluser]majidmx[/eluser]
Hi,
I'm doing an affiliate/ad system with Codeigniter.

User clicks on an ad, which goes to our website [www.mysite.com] and there I'll set cookie information for all the necessary info and redirect him to the main target website [www.targetweb.com].

After a sale is made in target website I want to get notified, through a pixel image. [any suggestions for other ways ?!]

I call a script in my website [www.mysite.com/index.php/sale/sale.png] which get the previously set cookies information and process and finally force download an image.

In firefox the cookie information are sent but in IE not.
In IE when a page in www.targetweb.com request an image from www.mysite.com , the corresponding cookies for mysite.com are not sent.

[All the cookies domain are set site-wide to ".mysite.com"]

Do you have any Idea ?!
Or any other way to do this ?!
Any idea will help me a lot

Thanks,
MajiD


Can't get cookie while processing an image request? - El Forum - 06-23-2008

[eluser]majidmx[/eluser]
I found the solution.
So I'll post it here for everyone who stock with such a thing in future.
You need to specify in the HTTP header that IE is allowed to send those cookies to hitrd party web sites.
Search for P3P and it really works.
You need to simply add a .htaccess file.
Let me know if you need further help.