protect email address from spiders

muzikool

Act your wage.
Political Access
Joined
27 Dec 2001
Messages
7,626
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?
 
You mean so you don't get spam, right?
 
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.
 
What if you use a PHP Mail Form? Would you receive spam?
 
~bk said:
What if you use a PHP Mail Form? Would you receive spam?

If the actual email address isn't displayed in the HTML code that's generated, no...the bots won't be able to pick it up.
 
NetRyder said:
If the actual email address isn't displayed in the HTML code that's generated, no...the bots won't be able to pick it up.

Ohh.. ok. Thanks.
 
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?
 
<!-- 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.
 
leedogg said:
ha. slowpoke ;)

angry.gif
tongue.gif
 
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?
 
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;
 
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"
 
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.
 
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
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back