To use the ContactsEncoder module:
-
Extend the platform-specific ContactsEncoder class
-
Instantiate the encoder
$contacts_encoder_params = new Params();
$contacts_encoder_params->api_key = 'CleanTalk API key';
$contacts_encoder = ContactsEncoder::getInstance($contacts_encoder_params);-
Prepare the content (HTML, text, etc.)
-
Encode contact details
$encoded_content = $contacts_encoder->runEncoding('your content do encode');- Output the modified content
echo $encoded_content;