$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, 'XF-Api-Key: <key>');
curl_setopt($ch, CURLOPT_URL, 'http://forum.ru/api/');
//curl_setopt($ch, CURLOPT_POST, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS, ['post' => 'post']);
$json = curl_exec($ch);
curl_close($ch);
echo $json;