Como obter a lista de fabricantes cadastrados via API ?

URL: http://www.nomedoseusite.com.br/api_products_others.php?action=manufacturers

Header Parameter Format
Usuario1 base64_encode()
Senha1 base64_encode()

PHP Sample:

 // sample manufacturers list
 
 $url = $domain_url . '/api_products_others.php?action=manufacturers';

 $ch = curl_init($url);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 
 curl_setopt($ch, CURLOPT_HTTPHEADER, array( 
 'Content-Type: application/json',
 "Cache-Control: no-cache", 
 'Usuario1: ' . base64_encode($usuario1),
 'Senha1: ' . base64_encode($senha1)) 
 ); 
 
 $result = curl_exec($ch);
 curl_close($ch);

 print_r($result);

 // sample manufacturers list eof

Return:

id
text

Deixe um comentário 0