Open Source Resources for Web Application Developers

Shopify - Online Store Builder
Follow Us on Social Sites
Subscribe RSS Subscribe Newsletter Like us on Facebook Follow us on Twitter Follow us on Google+
  • Home
  • News
  • Plugins
  • Design
  • Others
  • Books
  • About
02 Feb

Protect Your Email Address with PHP Hide_Email()

  • License Free, Tools
  • Leave a Comment

PHP hide_email() is a PHP function to protect the E-mail address you publish on your website against bots or spiders that index or harvest E-mail addresses for sending you spam. It uses a substitution cipher with a different key for every page load.

PHP hide_email() encrypts your E-mail address and generates the javascript that decrypts it. Most bots and spiders can’t execute javascript and that is what makes this work. A visitor of your web page will not notice that you used this script as long as he/she has javascript enabled. The visitor will see “[javascript protected email address]” in stead of the E-mail address if he/she has javascript disabled.

You can also use the generator if you have no PHP support on your web server. Change the E-mail address into your own E-mail address and press “Generate”. Cut and paste the generated XHTML into your own web page.

php-hide-email

Requirements: -
Demo: http://www.maurits.vdschee.nl/php_hide_email/
License: License Free

Share
Tweet
Sponsors
subscribe to our newsletter - weekly free resouces for web developers
follow us on social sites - rss, facebook, google+, Twitter
Subscribe RSS Like us on Facebook Follow us on Twitter Follow us on Google+
Related Resources
Spam Proof Email Generator – Email Addresses on Images

Spam Proof Email Generator – Email Addresses on Images

100+ Free HTML Email Templates with PSD Source Files

100+ Free HTML Email Templates with PSD Source Files

AtMail 6 Webmail Client + Email Server + Stunning Interface

AtMail 6 Webmail Client + Email Server + Stunning Interface

Mailcheck Helps Reduce Typos in Email Addresses

Mailcheck Helps Reduce Typos in Email Addresses

A Cloud-Enabled Desktop App for All Your Email

A Cloud-Enabled Desktop App for All Your Email

Monket Open Source Ajax Calendar

Monket Open Source Ajax Calendar

Comments
  • http://www.subscript.ca Scott MacDonald

    Cool idea… though I really doubt it will take long at all for there to be bots that will start parsing this. The safety lies in the fact that hopefully it doesn’t get too popular, or finding your own ways to slightly tweak it.

  • Fan

    kinda cool… but you could just use gmail and not worry about spam.

  • http://www.steinhaug.no/ Kim Steinhaug

    This is probably a great idea to implement on our customers webpages, as an option for them to enable. Myself I still have doubts about anything that isnt compatible with a none js browser – however I must be thinking like a dinosaur now.

    I used that argument like 5 years ago, it cannot possibly still be valid! Most parsers can’t possible see this, even if theoretical possible as they wouldt need to render the page which gives enourmous overhead when scarping say a million webpages. I am pretty sure you eliminate 99% of scrapers this way.

  • http://www.open-source-editor.com Mattias Wirf

    Great, the more ways to fight spam the better. I also think about the none js browsing visitors, but that can’t be a high number, right?

  • qqrq

    Kim => IMHO worrying about users that don’t have JS enabled is NOT just old-fashioned. Remember about tools that disable JS, which user can install (i.e. as Firefox add-on). It’s not a bad idea to use this stuff – if you launch browser from admin account (everything else in WinXP is pain in the ass), you can still suffer from “evil” scripts. And what about work? Some of us have blocked scripts doing their jobs.

  • http://fedmich.com/life fedmich

    I prefer the js version, but if possible, I’ll just make an image to show the email.

    anyway, here’s one I made before and use,
    http://www.pastetool.com/hide_email/

    Thanks for sharing :)

  • http://wesam.ly Wesam Alalem

    great function, I was using something like ‘mail AT example DOT com’, but now I’ll use this.
    Thank you

  • http://www.steinhaug.no/ Kim Steinhaug

    Alright, I just got the perfect sollution to make everyone happy here. The noscript function should simply be something like:

    A simple switching of letters and other way around serverside, and voila a perfect sollution! To bad I dont have my own blog up, I could have made myself some bonus hits by adding this feature!

  • http://www.steinhaug.no/ Kim Steinhaug

    Nice, the code was removed, logic was

    noscript
    img src=”imagecreation.php?codedemail@here.com

    The email fed to the image cration script would then have some letter switching, simple as a=c, c=b,c=a and such would be enough – than other way around server side.

  • http://fedmich.com/life fedmich

    GD Creation of image adds CPU load on the server, which I don’t want to resort to as much as possible.

  • http://www.ahwd.co Aisha Henderson

    I love this. Awesome!

  • chris

    Kim,
    I’d love to see more of your script. I follow that you’re using php to generate an img (which i’ve never even thought to do). I get you have some script that switches letters, too, but if you’re generating an image with the email address, why do you need to switch the letters?
    Thanks!

Open Source Resources for You

What we need is a list of the top quality resources, so that we can spend more time on our web development. WebAppers only picks the top quality web development resources for you.

© Copyright 2012 WebAppers | About | Archives | Privacy Policy | Advertise | Contact

Sponsors
Advertise Here
Search
By Keywords
30 Days / All Time
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Professional Business Cards Made By Designers
  • Best Free Chrome Extensions for Web Developers
  • All of the Best Free WordPress Themes You Need
  • How to Create a Web App Admin User Interface
  • Nice List of Open Source Fish Eye Menu
  • Best Web Admin Templates
  • 25 Useful Blogs for Web Design & Development
  • Simple Javascript Progress Bar with CSS
  • 10 Useful & Quality Design Resources
  • Free Web Application Icons
  • How to Create High-Performance Code
  • How to Create Realtime Multi-player Games in HTML5
  • A True Responsive jQuery Lightbox Plugin for Free
  • Create an Amazon-like Navigation Menu with jQuery
  • Pretty Neat jQuery Mobile Theme Based on Flat UI
  • Super Smooth CSS Transitions for jQuery
  • Free Responsive HTML5 + CSS3 Site Templates
  • How to Use Web Workers for Image Manipulation
  • How to Make FullScreen Page Transitions with CSS
  • Ghost: A Revolutionary Open Source Blogging Platform
Sponsors
Plugins
  • Advertisement15
  • Calendar47
  • Capture19
  • Charts55
  • Chat22
  • Demo Tour16
  • Gallery121
  • Maps30
  • Menu87
  • Polls9
  • Popup49
  • Tooltips42
  • Upload33
  • Video18
Desgin
  • Brushes11
  • Buttons25
  • Color Schemes25
  • Fonts47
  • Forms112
  • Icons108
  • Patterns24
  • PS Tutorials15
  • Stock Photos21
  • Tables25
Others
  • Announcement103
  • Best Collections6
  • Code55
  • eCommerce24
  • Framework215
  • Hosting13
  • Information240
  • Inspiration32
  • Legal Documents10
  • Reviews8
  • Security13
  • Social28
  • Sound16
  • Stats39
  • Tools294
  • Webmail14
Licesnes
  • BSD License67
  • CC License123
  • GPL License224
  • LGPL License40
  • License Free740
  • MIT License411
Sponsors
Advertise Here
Partners
MaxCDN