PHP code example of webnuvola / antispambot

1. Go to this page and download the library: Download webnuvola/antispambot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webnuvola / antispambot example snippets


echo antispambot('[email protected]');
// Example output: <a href="mailto:dem&#111;&#64;exa&#109;p&#108;&#101;.&#99;o&#109;">de&#109;&#111;&#64;e&#120;ample&#46;&#99;om</a>
// Example output decoded: <a href="mailto:[email protected]">[email protected]</a>

echo antispambot('[email protected]', 'Contact us');
// Example output: <a href="mailto:&#105;&#110;fo&#64;ex&#97;&#109;&#112;&#108;e&#46;co&#109;">Contact us</a>

echo antispambot('[email protected]', 'Contact us', ['class' => 'text-white', 'target' => '_blank']);
// Example output: <a href="mailto:&#105;&#110;&#102;o&#64;e&#120;&#97;&#109;ple.&#99;&#111;&#109;" class="text-white" target="_blank">Contact us</a>

echo \Webnuvola\Antispambot\Antispambot::antispambot('[email protected]');
// Example output: &#100;&#101;&#109;&#111;&#64;e&#120;a&#109;pl&#101;&#46;co&#109;