<?php $username = 'userinfo'; $password = 'userpassword'; $remote_url = "https://test.com/report_template.do?CSV&jvar_report_id=1"; $context = stream_context_create(array( 'http' => array( 'header' => "Authorization: Basic " . base64_encode("$username:$password") ) )); $fileName = file_get_contents($remote_url, false, $context); $filePath = "csv/files/".$fileName; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=\"$filePath \""); header("Content-type: text/csv"); header("Content-Transfer-Encoding: binary"); ?>
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE