$file = URL of my PDF file; $_POST['created_by'] = Core::getUserData('id'); $_POST['user_login'] = $_SESSION['user_login']; $data = $_POST; // pre($data,1); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $fileContent = readfile($file, false, $context);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)