Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
hide_email
This function will hide the $email string from boots which has JavaScript disabled as it needs JavaScript to display the mail.
Most Bots does not have JavaScript enabled as they only read the source code.
Use the $title string to make a title for the mail link and the $subject string for a subject for the mail.

hide_email

Quote

hide_email ( string $email [, string $title [, string $subject ] ] )


Parameters
email
The email you want to hide from boots

title
The title for the <a> tag

subject
Subject for the mail message if anybody opens the link and it opens in a mail client

Return Values
This function will return the email as a JavaScript function. If the person browsing has JavaScript enabled it will be shown correct else it will be hidden and hard to decrypt for a bot.

Example
Code
<?php
echo hide_email("name@name.com");
?>

This function will hide the email address if the person (or bot) does not have JavaScript enabled.

Output
// With JavaScript

Quote

<a href='mailto:name@mail.com'>name@mail.com</a>


// Without JavaScript

Quote

<script type='text/javascript'>ML="/@n:>axxxxrchm=fil'.t eo";MI="65B97Cxxxx;?:5=>AD325:C1:5=>@8D:?425:C1:5=>@8D:6054";ML=ML.replace(/xxxx/g, '<');MI=MI.replace(/xxxx/g, '<');OT="";for(j=0;j < MI.length;j++){OT+=ML.charAt(MI.charCodeAt(j)-48);}document.write(OT);</script>


See also …


References