How to use fopen fucntion to open a file (advertising Amazon report) with Authorization:Bearer
$10-30 USD
Paid on delivery
I have Amazon-Advertising-API-Scope, Amazon-Advertising-API-ClientId ,token and location
I code like this
$head = array(
'Amazon-Advertising-API-Scope:'.$ScopeID,
'Amazon-Advertising-API-ClientId:' .$ClientID,
'Authorization:Bearer '.$Token);
$context = stream_context_create(array(
'http' => array(
'method'=>'GET',
'header'=>$head)
));
//The path & filename to save to.
$saveTo = '[login to view URL] ';
$fp = fopen($Location, 'r', false, $context);
When I try to run, the error said "401 Unauthorized". I check carefully all parameters input already,
pls help me to fix it
Thank
Project ID: #31744757
About the project
2 freelancers are bidding on average $23 for this job
I have more than 5 years of experience working with PHP, MySQL, API, HTML, Javascript, Node Js, Vue Js, Css, Git, C#, SQL Server, Devexpress, and integrating online payment gateways, Paypal, Payer, PerfectMoney. I can More