• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

protect email address from spiders

muzikool

Act your wage.
Political User
#1
I understand that you can code your email in such a way on a web page so that it can't be picked up by a web spider. So what is the best way to do it and can someone post the code I need to use?
 
#3
One way is to use something like: netryder [at] osnn [dot] net
However, certain bots have learned to overcome tricks like this. Another more effective way is to type the address into an image, and use the image in place of the address.
 

muzikool

Act your wage.
Political User
#7
Yeah, mainly to prevent spam. I don't know anything about the PHP Mail Form. I found out that javascript can be used to make it work. Is this an effective way?
 

leedogg

Gojyone kawaiiiiiiii!
#8
<!-- Begin No Spam -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var user;
var domain;
var suffix;
function jemail(user, domain, suffix){
document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
}
// End -->
</script>
<!-- End No Spam -->

Then in the <BODY> section, insert this where you want your email address(es) to appear:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
jemail("yourname", "yourdomain", "tld");
// End -->
</script>

Replace "yourname" with your email name, "yourdomain" with your domain name and "tld" with "com," "net," "org" or what ever. For example, jemail("joe","blow","com") will display as joe@blow.com, a fully functional link.
 

muzikool

Act your wage.
Political User
#12
Thanks leedogg and NetRyder. :)

Another thing, what code do I add to the javascript in <body> in order to specify the font, size, and color of the text displayed?
 

j79zlr

Glaanies script monkey
Political User
#13
This used to work, not sure if they've fixed it, probably have, but I dont get any spam from my email address. use iso codes,

sample@example.org

is

&#115;&#97;&#109;&#112;&#108;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#111;&#114;&#103;
 
#14
the bots read the iso codes now

PHP:
<?php
// My Email Address
$myEmail = "email@mydomain.com";

// Additional Email Headers
$emailHeader = "From: {$_POST['fromEmail']}\r\n";
$emailHeader .= "Content-type: text/plain\r\n";
$emailHeader .= "X-mailer: PHP v" . phpversion();

// Send The Email
$email = mail($my_email, $_POST['subject'], $_POST['message'], $emailHeader);

if ($email) {
echo "Email Sent";
} else {
echo "Email Failed";
}
This assumes a web form which has at least three fields
a input[text] section with its name set to "fromEmail"
a input[text] section with its name set to "subject"
a textarea with its name set to "message"
 

muzikool

Act your wage.
Political User
#15
Still wondering how to code for text size, color, and font within the javascript for use with what leedogg posted earlier. I don't want the address displayed blue and underlined.
 
#17
the spiders will no doubt learn how to read it in that format as well, they soon may be able to understand how to parse the javascript for the information they are looking for
 

SPeedY_B

I may actually be insane.
#18
They can parse anything, keep in mind the people who invent the robots are internet users also, and therefore know the methods used to try and deter their own robots.

They can even read images and have now been made 'intelligent' so they can learn and post to almost any HTML form. It is quite a pain in the ass, however robots are being used less and less in favour of either huge lists or randomly generated names.
 

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,016
Latest member
doertilog