[ 'header' => "Authorization: {$authrequest}, username=\"{$yacyusername}\", uri=\"/?auth=\", response=\"{$authresponse}\", nc=00000001, cnonce=\"0a4f113b\"", ]]) ); //echo var_dump($http_response_header); return; } $headers = "X-NoProxy: 1\n"; foreach ( getallheaders() as $key => $value ) { if ( !$value || $key === 'Accept-Encoding' ) { continue; } if ( $key === 'Host' ) { $value = explode( '//', $memosinstance )[1]; } $headers .= "{$key}: {$value}\n"; } $response = file_get_contents( "{$memosapipath}/{$_GET['endpoint']}", false, stream_context_create([ 'http' => [ 'method' => $_SERVER['REQUEST_METHOD'], 'header' => $headers, 'content' => file_get_contents('php://input'), ]]) ); shell_exec(sprintf( 'php %s %s > /dev/null 2>&1 &', __FILE__, explode( '%', explode( '%12%16', urlencode($response) )[1] )[0] )); foreach ( $http_response_header as $header ) { header($header); } echo $response;