If I use the following:
$homepage = file_get_contents('http://www.website.com/api/v1/members/102210');
echo $homepage;
The data is displayed as follows:
{"user":{"profile":{"Id":{"Label":"User Id","Value":102210},"User":{"Label":"User Name","Value":"tom"}
I tried the following that I discovered on here in another post but the page remains blank other than User:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://www.website.com/api/v1/members/102210",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
$response = json_decode($response, true); //because of true, it's in an array
echo 'User: '. $response['User']['User Name'];

$responsevar please ?print_r($response);