Open link in a new tab

Content

Expand project menu

conect API whit PHP

i want to know how can conect with PHP this is my source
@
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘apikey’=>‘sajghdfjjagdhsfxxxxxxxx’));
curl_setopt($ch, CURLOPT_URL, ‘http://url/api/v3/projects/97/queries/default?pageSize=200&showHierarchies=true’);
$result = curl_exec($ch);@

but i can´t

Message actions

resolved this whit this line

@ curl_setopt($ch, CURLOPT_HTTPHEADER, array(“Authorization: Basic ”.base64_encode(‘apikey:895755dsghsXXXSsdXXXXXXX’)));@