You are here

function getAutoKey in Anti Spam by CleanTalk 7.2

Same name and namespace in other branches
  1. 8 cleantalk.module \getAutoKey()
  2. 7 cleantalk.module \getAutoKey()

Function gets access key automatically

Parameters

string website admin email:

string website host:

string website platform:

Return value

type

File

./cleantalk.module, line 1178
Main CleanTalk integration module functions.

Code

function getAutoKey($email, $host, $platform) {
  $request = array();
  $request['method_name'] = 'get_api_key';
  $request['email'] = $email;
  $request['website'] = $host;
  $request['platform'] = $platform;
  $url = 'https://api.cleantalk.org';
  $result = sendRawRequest($url, $request);
  return $result;
}