$postid = $_GET['id']; //holds post id $apicall = "https://apiprod.livehub.me/api/posts/".$postid; $options = array( 'http' => array( 'method' => 'GET', 'header'=> "Content-Type: application/json\r\n" . "Accept: application/json\r\n" . "domain_id: 28\r\n" ) ); $context = stream_context_create( $options ); $result = file_get_contents( $apicall ); $response = json_decode( $result, true ); ?>