public function Cleantalk::getCleantalkCommentHash in Anti Spam by CleanTalk 8
Function to get the message hash from Cleantalk.ru comment
Parameters
$message:
Return value
null
File
- src/
Cleantalk.php, line 502
Class
- Cleantalk
- Cleantalk class create request
Namespace
Drupal\cleantalkCode
public function getCleantalkCommentHash($message) {
$matches = array();
if (preg_match('/\\n\\n\\*\\*\\*.+([a-z0-9]{32}).+\\*\\*\\*$/', $message, $matches)) {
return $matches[1];
}
else {
if (preg_match('/\\<br.*\\>[\\n]{0,1}\\<br.*\\>[\\n]{0,1}\\*\\*\\*.+([a-z0-9]{32}).+\\*\\*\\*$/', $message, $matches)) {
return $matches[1];
}
}
return NULL;
}