View Full Version : Question: Avoiding spam-spiders
RadixHosting
September 1st, 2007, 15:38
Hello,
I'm looking for a way to put my email address on my web site, as a link, without spam spiders logging it and adding it to spam lists.
Currently, this is what I have:
http://www.radixhosting.com/v1/index.php?page=contact
As you can see the email addresses are publicly shown, in the form of a link. But if you look at the code, you won't see my email addresses but you will see something like this:
<Script Language='Javascript'>document.write(unescape('%3C%61%20%68%72%65%66%3D%22%6D%61%6 9%6C%74%6F%3A%73%61%6C%65%73%40%73%74%61%66%66%2E%72%61%64%6 9%78%68%6F%73%74%69%6E%67%2E%63%6F%6D%22%3E%73%61%6C%65%73%4 0%73%74%61%66%66%2E%72%61%64%69%78%68%6F%73%74%69%6E%67%2E%6 3%6F%6D%3C%2F%61%3E'));</Script>
Now my question is: Is this a safe way to protect myself against spam? Or are there spam spiders around that evaluate JavaScript and will still be able to see the email addresses?
Thanks
carlito
September 1st, 2007, 21:54
Interesting question. I gather that putting it in, you know, info AT website DOT com DOT au doesn't work? That's what I've always done, but when you think about it surely the spam spiders would find a way around that LOL..
RadixHosting
September 2nd, 2007, 09:03
Interesting question. I gather that putting it in, you know, info AT website DOT com DOT au doesn't work? That's what I've always done, but when you think about it surely the spam spiders would find a way around that LOL..
I always found it uncomfortable using that method because
a) Too many people do it, they will find a way around that
b) It doesn't really look that good on business websites
c) You can't make it a link
:)
krakjoe
September 2nd, 2007, 13:25
hide your email address by using a contact form ......
RadixHosting
September 2nd, 2007, 13:33
hide your email address by using a contact form ......
I am using a contact form. But I would also like to put the email addresses on my website.
krakjoe
September 2nd, 2007, 13:52
If you must
<?php
function email2image( $address, $font = 2 )
{
if( function_exists( 'imagecreate' ) )
{
$image = imagecreate( strlen( $address ) * 3 , 30 );
$background = imagecolorallocate( $image, 255, 255, 255 );
$textcolor = imagecolorallocate( $image, 0, 0, 255 );
if( imagestring( $image, $font, 2, 2, $address, $textcolor ) )
{
header("Content-type: image/png");
imagepng( $image );
}
}
}
email2image('krakjoe@krakjoe.info');
?>
<html>
I'm not telling you me email address - <img src="<?=$_SERVER['PHP_SELF']; ?>?hide=1"/>
</html>
<?
endif;
?>
Something like that outa do the trick, you can prolly do something a little better with gd, I got no creative talent at all ...
RadixHosting
September 2nd, 2007, 13:55
If you must
<?php
function email2image( $address, $font = 2 )
{
if( function_exists( 'imagecreate' ) )
{
$image = imagecreate( strlen( $address ) * 3 , 30 );
$background = imagecolorallocate( $image, 255, 255, 255 );
$textcolor = imagecolorallocate( $image, 0, 0, 255 );
if( imagestring( $image, $font, 2, 2, $address, $textcolor ) )
{
header("Content-type: image/png");
imagepng( $image );
}
}
}
email2image('krakjoe@krakjoe.info');
?>
<html>
I'm not telling you me email address - <img src="<?=$_SERVER['PHP_SELF']; ?>?hide=1"/>
</html>
<?
endif;
?>
Something like that outa do the trick, you can prolly do something a little better with gd, I got no creative talent at all ...
Thanks for the code. I used to put an image on my website containing my email address, but that's what I'm trying to avoid now. :) The main purpose is that I want people to be able to click on a link which will open their mail application (using the <a href="mailto:...">).
krakjoe
September 2nd, 2007, 13:59
javascript escaping is all you got then, but that can be deciphered with php, I imagine if you went to the trouble of writing software to steal peoples email addresses unescaping javascript strings would be one of the first things to do ....
RadixHosting
September 2nd, 2007, 14:03
I'm still wondering how effective it is... So you say you would do it that way, but do spammers actually do it that way? :) Guess you can't know unless you have experience with this type of "hiding" your HTML.
GlennBeforeTime
September 3rd, 2007, 08:48
Spiders cant phrase JavaScript. Thats why JavaScript is bad for SEO. But yes, that should protect against spam harvesting for a while until the figure out a way around it.
But if someone uses an email harvester then they must be dumb so don't count on them figuring out a way around it.
RadixHosting
September 3rd, 2007, 08:51
What's so dumb about that? The fact that they might also harvest honeypots?
krakjoe
September 3rd, 2007, 09:48
Spiders cant phrase JavaScript.
<?php
function unescape( $in )
{
if( preg_match_all( '~%(.*?[^%]+)~', $in, $chars ) )
{
foreach( $chars[1] as $char ) $out[ ] = chr( hexdec( $char ) );
}
return implode( null, $out ) ;
}
echo unescape( '%3C%61%20%68%72%65%66%3D%22%6D%61%69%6C%74%6F%3A%73%61%6C%6 5%73%40%73%74%61%66%66%2E%72%61%64%69%78%68%6F%73%74%69%6E%6 7%2E%63%6F%6D%22%3E%73%61%6C%65%73%40%73%74%61%66%66%2E%72%6 1%64%69%78%68%6F%73%74%69%6E%67%2E%63%6F%6D%3C%2F%61%3E' );
I highly doubt that the authors of said spam-spiders haven't worked that out for themselves .... HIGHLY DOUBT IT ..... again, escaping strings in a page is NOT protecting them in any way shape or form .... NONE ...
RadixHosting
September 3rd, 2007, 09:50
Thanks Joe.
In that case, I'm looking for alternatives. Maybe JavaScript encode/decode algorithm?
krakjoe
September 3rd, 2007, 09:53
Anything that you do programmatically will be broken programmatically, the best option you have is using an image and hope that people know how to start a new email in their email client ..... even images can be broken programmatically, but if you design your own background image before you impose text on it the chances of someone putting the time and effort required to break that image and decipher the text on it is next to none .....
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.