Setting a Cookie in an image file?
Posted: Wed Nov 26, 2008 1:09 am
Hi I'm using a separate php image file to return a dynamic image. I'd like to return some values along with the image in a cookie. Is this possible to do? Every time I try to write a cookie in the image file, nothing happens. Here's the code I'm using:
Am I running into problems because I declare the content type as an image in a header?
If so, is there any way I can pass those values?
For those who want to see the application you can check it out at:
http://www.vinylletteringdecor.com/cust ... tering.php
I'm trying to pass the ratio of the height and width of the text string (pulled from the bounding_box) so I can give an accurate width, because the approximate width can be WAY off depending on the font being used. Any help would be great. Thanks
Code: Select all
setcookie("image_ratio", $ratio, time()+3600);Am I running into problems because I declare the content type as an image in a header?
Code: Select all
header('Content-type: image/png');For those who want to see the application you can check it out at:
http://www.vinylletteringdecor.com/cust ... tering.php
I'm trying to pass the ratio of the height and width of the text string (pulled from the bounding_box) so I can give an accurate width, because the approximate width can be WAY off depending on the font being used. Any help would be great. Thanks