4d/docs

Comment on REST/$imageformat.md (19)

gaetanarinfo opened this issue · 0 comments

Bonjour,

Est-til possible d'afficher l'image car actuellement il retourne array(1) { ["ok"]=> bool(true) }

Technologie utilisé PHP

env('LOCMAT_URL') // ip local

$url = 'http://' . env('LOCMAT_URL') . '/rest/Articles(652)/ImageCAB?$imageformat=best&$version=2&$expand=ImageCAB';

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'username-4D: SQL',
'password-4D: LocmatSQL',
'session-4D-length: 60',
'Cookie: 4DSID_Locmatv18=' . $_COOKIE['4DSID_Locmatv18'] . ';WASID4D=' . $_COOKIE['WASID4D']
),
));

$response = curl_exec($curl);

curl_close($curl);

$decodedData = json_decode($response, JSON_PRETTY_PRINT);

$data3 = $decodedData;

var_dump($data3);

Merci pour votre réponse