Re: [PHP] Re: Hiding email address from Robots ??
you could make it more difficult when you replace the href=... with href=#. the only problem now is that people without javascript can's use it. you can make the onClick part (almost)impossible to harvest by putting part(s) of the adres into a variable somewhere else in the html-code like this: scriptvar nospam = 'mail'/script a href=# onclick=location.href='mai'+'lto:'+nospam+unescape('%40')+'domain.com'; return false;mail#x40;do!--make it difficult--main#x2e;com/a the weakest link is now the part between the a an /a Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Gerben ([EMAIL PROTECTED]): just google for it. there are several PHP classes that do that for you. try something like: a href=mail-at-domain-dot-com onclick=location.href='mai'+'lto:'+'mail'+unescape('%40')+'domain.com'; return false;mail#x40;do!--make it difficult--main#x2e;com/a Only problem is anything obscured can pretty much be found /(\w+).*(at|@).*(\w+).*(\.|dot).*(\w+)/ Even javascript could be rendered then captured. It all depends on the persons dedication on finding them. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hiding email address from Robots ??
Actually, a robot will read the html it generates, so this won't really help. However, if you store your adresses as character codes ( ie a space is %20) and not just text, most robots have a hard time reading them. News [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looking for opinions before I start using this to hide the email address on a page $nx = username; $sx = domain; $mx = [EMAIL PROTECTED]; Then mailto:? echo $mx ? Hopefully a Robot would read the address as the result of $mx, which is totally useless - but it seems too easy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hiding email address from Robots ??
just google for it. there are several PHP classes that do that for you. try something like: a href=mail-at-domain-dot-com onclick=location.href='mai'+'lto:'+'mail'+unescape('%40')+'domain.com'; return false;mail#x40;do!--make it difficult--main#x2e;com/a (I didn't check it) I hope you can read it. News [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looking for opinions before I start using this to hide the email address on a page $nx = username; $sx = domain; $mx = [EMAIL PROTECTED]; Then mailto:? echo $mx ? Hopefully a Robot would read the address as the result of $mx, which is totally useless - but it seems too easy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Hiding email address from Robots ??
* Thus wrote Gerben ([EMAIL PROTECTED]): just google for it. there are several PHP classes that do that for you. try something like: a href=mail-at-domain-dot-com onclick=location.href='mai'+'lto:'+'mail'+unescape('%40')+'domain.com'; return false;mail#x40;do!--make it difficult--main#x2e;com/a Only problem is anything obscured can pretty much be found /(\w+).*(at|@).*(\w+).*(\.|dot).*(\w+)/ Even javascript could be rendered then captured. It all depends on the persons dedication on finding them. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Hiding email address from Robots ??
CZ It all depends on the persons dedication on finding them. I usually just convert them to HTML entities with a function like this: function spamProtect ($address) { $address = str_replace(@, #64;, $address); $address = str_replace(., #46;, $address); $address = str_replace(:, #58;, $address); return $address; } You can call it with: spamProtect([EMAIL PROTECTED]) or spamProtect(mailto:[EMAIL PROTECTED]) But, like Curt said, those dedicated to harvesting e-mail addresses can add further complexity to their e-mail harvesting programs and catch these rather easily. Ultimately, the best way to keep people from grabbing e-mail addresses is not to display them on your Web site at all. This hurts you if you need a point of contact; however, you could use a form that sends a message to a processing script that then e-mails the message to the intended recipient. The e-mail address would never need to be visible to the browser, and so, the harvesters would never get your address. -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Hiding email address from Robots ??
I use two ways of doing this. 1. ( As already pointed out ) don't display your email address at all but have an online form. 2. Use an image with a little noise in the background (idea from CAPTCHA), its just not worth it to write a program that sees an email address to harvest it. This solution is of course only if you have very very few email addresses you want to display... BUT if you want to add a mailto link...you will still need javascript or something to disguise it...which brings us a full circle to...(unless you are using point 1 above)...depending on how badly the harvester wants your address..blah blah blah Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php