webnuvola/antispambot

Stand-alone antispambot function from WordPress
4,025
Install
composer require webnuvola/antispambot
Latest Version:v1.5.0
PHP:^8.1
License:GPL-2.0-or-later
Last Updated:Mar 1, 2024
Links: GitHub  ·  Packagist
Maintainer: fab120

Antispambot

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package allows you to use the antispambot function outside of WordPress.

Installation

You can install the package via composer:

composer require webnuvola/antispambot

Usage

echo antispambot('demo@example.com');
// 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:demo@example.com">demo@example.com</a>

echo antispambot('demo@example.com', '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('demo@example.com', '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('demo@example.com');
// Example output: &#100;&#101;&#109;&#111;&#64;e&#120;a&#109;pl&#101;&#46;co&#109;

Use antispambot_html function to return an instance of Illuminate\Support\HtmlString to use with Laravel framework.

Documentation

antispambot on WordPress Developer Resources.

Testing

composer test

Credits

License

This software is release under GPL v2. Please see LICENSE file for more information.

Related Packages

shoaibnawaz/laraveldkim

A Laravel plugin to sign all outgoing emails using DKIM from within the applicat...

53 1
djurovicigoor/postmark-bounced-email-blocker

This package will prevent sending an email to addresses that marked an email as...

2,429 7
rapideinternet/laraveldkim

A Laravel plugin to sign all outgoing emails using DKIM from within the applicat...

4,536 9
academe/laraveldkim

A Laravel plugin to sign all outgoing emails using DKIM from within the applicat...

49,361 16