You probably need to send the session ID of the user in a cookie along with the request If you want to use the file_get_contents function, you have to create a context to set a cookie: $opts = array( 'http' => array( 'method' => 'GET', 'header' => 'Cookie: PHPSESSID=0123456789abcdef0123456789abcdef' ) ); $context = stream_context_create($opts); echo file_get_contents('master.example.com/master.php', 0, $context).
You probably need to send the session ID of the user in a cookie along with the request. If you want to use the file_get_contents function, you have to create a context to set a cookie: $opts = array( 'http' => array( 'method' => 'GET', 'header' => 'Cookie: PHPSESSID=0123456789abcdef0123456789abcdef' ) ); $context = stream_context_create($opts); echo file_get_contents('master.example.com/master.php', 0, $context).
– Anonymous Apr 20 '09 at 18:14 You can’t get the user’s cookies for another site except the user gives it to you. Because cookies are domain-specific and only sent to the domain they are valid for. – Gumbo Apr 20 '09 at 18:35.
Your PHP configurations are probably prohibiting you to retrieve files over HTTP. Possible culprits: Safe mode Open basedir allow_furl_open.
You should be able to retrieve the content with curl. See this answer (you can probably drop the browser spoof option).
Keep in mind that if your session code validates against client IP address, then you may still have issues as the client IP posted to your page will be that of the requesting server (using curl or file_get_contents) instead of the client browser.
If you have control over the domain-a.com/master.php then you can have it programmed in a way that you could send it the username in encrypted fashion and like master. Php? User=zxcvert2324 or whatever and it would decrypt and know who is sending the request.
Otherwise you would need to look into CURL and have the session created by first having curl login to that site and then on the next request goto that master. Php page.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.