Yii 1.1: mailto

Encodes mailto links to hinder bots from scraping email addresses.
8 followers

Hinders bots from scraping email addresses from your website.

GitHub

Requirements

  • Yii 1.1.x

Install

  • Extract to extensions directory
  • Add as component to main config
  • 'mailto'=>array('class' =>'application.extensions.mailto.Mailto'),

Usage

$options = array(
    'cc' => 'cc@theemail.com',
    'bcc' => 'bcc@theemail.com',
    'followupto' => 'followupto@theemail.com',
    'subject' => 'The Subject',
    'newsgroup' => 'newsgroup',
    'class' => 'emailLinkClass',
    'id' => 'emailLinkID',
    'name' => 'emailLinkName',
    'title' => 'emailLinkTitle',
);
 
Yii::app()->mailto->link('sendingto@gmail.com', 'javascript', 'Link Text', $options);

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads