Why use of session name and session id in the get variables does not work?
- by Roman
I have the following code:
$location .= 'red=no&'.session_name() . "=". session_id();
$content = file_get_contents($location);
echo $content;
If I run it, noting is displayed in my browser. However, if I modify it in the following way:
$location .= 'red=no';
$content = file_get_contents($location);
echo $content;
everything works fine (I see the content in my browser).
What is also strange, if I display the value of the $location variable from the first example (url) and manually paste it in the address line of my browser, I do see the content. So, my browser is able to use this URL and file_get_contents not.
Does anybody know how it can be explained?