I am new to PHP and have been trying to access to the API for the past 2 hours. Everytime i request for the json object, it kept giving me null. I am sure i filled up the URL and Accountkey correctly. Can comeone please correct me if i did anything wrong with the code below. Thank you.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'http://urlxxxxxxxx.com');
$header = array(
'AccountKey:' => 'xxxx',
'Accept:' => 'application/json');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$result = curl_exec($ch);
$obj = json_decode($result);
curl_close($ch);
print "<pre>";
print_r($obj);
print "</pre>";
?>