What am I doing wrong? I get no response from the API.
<?php
$query = array(' [
"email" => "test@gmail.com",
"group_names" => "",
"custom_message" => "" ]');
$paramArray['api_key'] = '....................';
$paramArray['api_username'] = "admin";
$url = sprintf
(
'%s://%s%s?%s',
'https',
'forum.exemple.com/',
'invites',
http_build_query($paramArray)
);
$invite = curl_init();
curl_setopt($invite, CURLOPT_URL, $url);
curl_setopt($invite, CURLOPT_POSTFIELDS, http_build_query($query));
curl_setopt($invite, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($invite);
curl_close($invite);
print_r($resp);
?>