Hi, I am returning data via an API using JSON and want to format this so that I can display individual bits of data. At present, I just get the whole chunk of data returned and cannot figure out how to format this. Can anyone help please?
Formatting JSON Request in PHP
4
Hi,
I am returning data via an API using JSON and want to format this so that I can display individual bits of data. At present, I just get the whole chunk of data returned and cannot figure out how to format this. Can anyone help please?
<?php
function curl_request(){
$headers = array(
'Content-type: application/JSON',
'Authorization: basic ' . base64_encode('######'.'+'.'#############'.':'.'## ############'),
);
$ch = curl_init();
curl_setopt ($ch, CURLOPT_CAINFO, "D:\Plesk\VHOSTS\plustwodesign.com\bournetown.co.u k\cacert.pem");
curl_setopt($ch, CURLOPT_URL, 'https://api-eu.myconnectwise.net/v2017_1/apis/3.0/service/tickets/13024');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$json = curl_exec($ch);
$input = json_decode($json);
//return $input->summary; //This doesn't work
curl_close ($ch);
}?>
_________________________________________
Relax: bad things ringtone, instrumental ringtones, free ringtone
I am returning data via an API using JSON and want to format this so that I can display individual bits of data. At present, I just get the whole chunk of data returned and cannot figure out how to format this. Can anyone help please?
<?php
function curl_request(){
$headers = array(
'Content-type: application/JSON',
'Authorization: basic ' . base64_encode('######'.'+'.'#############'.':'.'## ############'),
);
$ch = curl_init();
curl_setopt ($ch, CURLOPT_CAINFO, "D:\Plesk\VHOSTS\plustwodesign.com\bournetown.co.u k\cacert.pem");
curl_setopt($ch, CURLOPT_URL, 'https://api-eu.myconnectwise.net/v2017_1/apis/3.0/service/tickets/13024');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$json = curl_exec($ch);
$input = json_decode($json);
//return $input->summary; //This doesn't work
curl_close ($ch);
}?>
_________________________________________
Relax: bad things ringtone, instrumental ringtones, free ringtone
- gayanw
- David Beroff
- Pava
Next Topics on Trending Feed
-
4