Jump to content

WebGeekUK

New Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by WebGeekUK

  1. Hi again, When adding var_dump($json) I get the following response: bool(false)
  2. Hi again Requinix and thanks for your support. Unfortunately when I run your test script nothing is returned.
  3. I have solved the issue with the 'Cannot modify header information' error, however, I am still no closer to understanding why this doesn't seem to be working... This is the page where the api data is being called: http://www.bournetown.co.uk/bourne-events3.php.
  4. It doesn't even show any of the api data that is being called in the browser header console...
  5. Hi, Having tried the code suggested, I get the following error: Warning: Cannot modify header information - headers already sent by
  6. Hi Requinix, I'm unsure what the contents are as I can't view anything in the browser when I run the code. I have checked to ensure the URL and authorization details are correct. The following link details what should be returned: https://developer.connectwise.com/manage/rest?a=service?a=Service&e=Tickets&o=GET.
  7. Hi, I am trying to use the following code to connect to an API and then display the data to screen, however, at present when running the code nothing at all is displayed and nothing happens. I'm fairly new to PHP and just cannot figure out what I'm doing wrong. Please help! <?php ini_set('display_errors',"1"); function curl_request(){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://eu.myconnectwise.net/v2017_1/apis/3.0/services/tickets/13934"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: basic ' . base64_encode('#######'.'+'.'##########'.':'.'##########'))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $json = curl_exec($ch); curl_close ($ch); $obj = json_decode($json); print ($obj['summary']); } print curl_request(); ?> The data structure of what I am trying to pull back is as follows: Ticket {id(Integer) * summary(String(100)) recordType(Enum) board(BoardReference) }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.