I have information stored in a session. But was I just found out, sessions don't work when you do file_get_contents().
So after some searching I thought of using this technic:
$cart = base64_encode(serialize($_SESSION['cart']));
I pass my session cart, serialize it and encode it. I then pass it into the file_get_contents.
$url = "http://www.domain.com/pdf_order.php?cart=".$cart;
$html = file_get_contents($url);
In the URL that it gets, I have this:
$cart = unserialize(base64_decode($_GET['cart']));
But I don't get anything. I can print out the GET cart and I have an encoded string, but then I can't do anything with it.
Any help, much appreciated.