Jump to content

creating a session in a picture (GB library)


tlucid

Recommended Posts

Hi,

 

I have a problem. I wrote a short program displaying a small image. But.. the trick is I want the image to start a session, so that what i did:

 

image.php

<?php
session_start();
$_SESSION['a']="that's the message I want you to remember";
header('Content-Type: image/jpeg'); 
$im = imagecreatetruecolor(15, 15);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
imagefill($im, 0, 0, $black);
imagejpeg($im);
?>

 

let's say the image is hosted on http://domain1.com/image.php

 

so, on domain2, I put a simple html page which looks like that:

http://domain2.com/index.html

<a href="domain1.com/result.php">
<img src="domain1.com/image.php">
</a>

 

and.. the 'result.php' is trying to "read" the $_SESSION['a'].

 

and it all works great in firefox.. but in IE6.0 there is a problem with blocking cookie from domain1, because of

lack of(?) Web Site's Privacy Policy..

 

Now I was reading something about P3P, but frankly I have no clue how to fix that..

Archived

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

×
×
  • Create New...

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.