How to use fopen fucntion to open a file (advertising Amazon report) with Authorization:Bearer

Cerrado Publicado hace 2 años Pagado a la entrega
Cerrado Pagado a la entrega

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

PHP Amazon

Nº del proyecto: #31744757

Sobre el proyecto

2 propuestas Proyecto remoto Activo hace 2 años

2 freelancers están ofertando un promedio de $23 por este trabajo

lmhunhthanh91

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 Más

$20 USD en 1 día
(3 comentarios)
2.1