you must close the current session first, just before calling the function "file_get_contents" call this function "session_write_close".
do not forget to reopen session_start after calling "file_get_contents" if you want to use sessions after that calling.
so the code will be like this:
$options = array(
'http' => array(
'header' =>
"Content-type: application/x-www-form-urlencoded\r\n".
"Cookie: {$this->COOKIE}\r\n",
'method' => $this->method,
'content' => $this->POST,
),
);
session_write_close();
$c = file_get_contents($this->uri, false, stream_context_create($options));