Now I want to use read_cookie.php to display test.gif:
//$value should equal to "test.gif"
//Now display this picture
Header ("Location: $value");
When loading read_cookie.php directly, it can display test.gif without any problem. However, I want to display this picture in some HTML files, using the following method:
The problem is, the picture displayed is unknown.gif, not test.gif. In another word, when calling read_cookie.php as an image of test.html, the $_COOKIE["cookie_name"] variable returns ' ', not test.gif. Why? How to solve this problem?
Hello all, thank you for your typing. The problem is caused by IE's privacy setting. By default, the privacy of IE does not allow reading domain Abc.com cookie from domain xyz.com, even if domain xyz.com calling a php program of domain abc.com. But a lot of tracking scripts, like Google Adwords and Overture use this method to track conversion rate. Does this mean they are all useless?
Note: HTTP/1.1 requires an absolute URI as argument to Location: including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise