I have a page with an iframe in it. Inside this iframe is a variable. I need to use this variable in the main page. How in the world do I read it out of there?

I am using sessions in the inside page, but it does not seem to work. I am really stuck. Can anyone help me?