• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Question: Avoiding spam-spiders

RadixHosting

New Member
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:

Code:
<Script Language='Javascript'>document.write(unescape('%3C%61%20%68%72%65%66%3D%22%6D%61%69%6C%74%6F%3A%73%61%6C%65%73%40%73%74%61%66%66%2E%72%61%64%69%78%68%6F%73%74%69%6E%67%2E%63%6F%6D%22%3E%73%61%6C%65%73%40%73%74%61%66%66%2E%72%61%64%69%78%68%6F%73%74%69%6E%67%2E%63%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
 
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..
 
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

:)
 
If you must
PHP:
<?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 ...
 
If you must
PHP:
<?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:...">).
 
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 ....
 
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.
 
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.
 
Spiders cant phrase JavaScript.

PHP:
<?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%65%73%40%73%74%61%66%66%2E%72%61%64%69%78%68%6F%73%74%69%6E%67%2E%63%6F%6D%22%3E%73%61%6C%65%73%40%73%74%61%66%66%2E%72%61%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 ...
 
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 .....
 
Back
Top