I setup a function to get the output of another page. But i am only getting back the file contents. I cant figure out why? Here is my code:
$from = date('d.m.Y'); $to = date('d.m.Y', strtotime('+30 day', time())); $postdata = http_build_query( array( 'set' => $from, 'to' => $to ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $list = file_get_contents($_SERVER['DOCUMENT_ROOT'] . 'Events.php', false, $context);