so after some great help, I've managed to get the script doing everything I need it to, but I need help with the next bit.
Please see my script below. <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.xxxxx.com/webAPI/api/stock',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8" ?>
<traderapi>
<token>T1a5c3t9</token>
<variant>Clearbank ltd</variant>
<pon>X</pon>
</traderapi>',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer T1a5c3t9',
'Content-Type: application/xml'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response
?>
I get the Picture of Chrome results
The results that are displayed as this "210-AZBVTBC"
However in the code show this (as per the picture) "210-AZBVTBC4"
You can see I do a simple echo $response. How do I parse the information so I can show and manipulate how I show the individual tags. For example
echo ''.$response->Sku.'
';
CURLOPT_CUSTOMREQUEST => 'GET'- instead you're probably supposed to setCURLOPT_POST => 1... but to be 100% sure, we need the API documentation. where is the documentation for the API you're trying to use?