Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8432389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:06:49+00:00 2026-06-10T06:06:49+00:00

I found this nice email protector script from css-tricks.com (link) Here is the code:

  • 0

I found this nice email protector script from css-tricks.com (link)

Here is the code:

<?php
    function php_split_js_make_email($phpemail)
    {
        $pieces = explode("@", $phpemail);

        echo '
            <script type="text/javascript">
                var a = "<a href=\'mailto:";
                var b = "' . $pieces[0] . '";
                var c = "' . $pieces[1] .'";
                var d = "\' class=\'email\'>";
                var e = "</a>";
                document.write(a+b+"@"+c+d+b+"@"+c+e);
            </script>
            <noscript>Please enable JavaScript to view emails</noscript>
        ';
    }
?>

Usage

<?php php_split_js_make_email("youremail@here.com"); ?>

Now I would like to know how secure this code is today, since this post is more than a year old now…

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:06:51+00:00Added an answer on June 10, 2026 at 6:06 am

    The script is only secure if the robot sniffing your page for email addresses doesn’t execute the JavaScript.

    On my personal site, I embed my email address as an image and use an online form to send mail instead of a mailto link.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've found this nice slick effect in here - http://www.red-team-design.com/wp-content/uploads/2011/04/css3-box-shadow.html . Here is a
i found this nice jquery plugin http://www.goat1000.com/tagcanvas.php the description says: The canvas is a
I found this nice snippet of code online: rkApp = Registry.LocalMachine.OpenSubKey(SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run, true); Which runs
Following this nice example I found, I was trying to create a function that
I found this code which is quite nice: + (UIImage *) imageWithView:(UIView *)view {
I found this really nice function that receives your desired proportions and resizes/crops the
I browsed around here on Stackoverflow and found this topic : https://stackoverflow.com/questions/279/aspnet-visual-studio-and-subversion-how-to-integrate However that
Linux has this nice function dprintf : The functions dprintf() and vdprintf() (as found
I've found this nice jquery plugin tag it! http://levycarneiro.com/2010/03/tag-it-tag-suggestions-editor-and-autocomplete-in-a-jquery-ui-plugin/ and want to implement it
just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.