Forum Moderators: coopster

Message Too Old, No Replies

hiding mailto email from spam bots

         

Kysmiley

3:29 am on Mar 1, 2005 (gmt 0)

10+ Year Member



is there any way to hide your mailto email address from spam bot email harvesters I have a php form and want to try to keep from getting spam email. Or can anyone offer any other tips on hows to do it short of not using a contact form and putting an email address on line
Pat

incrediBILL

4:22 am on Mar 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why would you put a to: field in the web page?

You can find a bunch of off the shelf form mail programs that have the to: email address securely buried on the server unless you want to write your own.

Have the form submit the content to the server, then send the email via the server side script, thus making the to address private and also blocking spammers from using your server to relay junk mail.

jatar_k

5:32 am on Mar 1, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



submitting the info and having the email address in your php code is the best bet but this is also an option

try this search [google.ca]

dreamcatcher

9:06 am on Mar 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also use javascript.

Kysmiley

11:30 am on Mar 1, 2005 (gmt 0)

10+ Year Member



Right now my php page/script is a self posting script. So I am thinking or understanding that the mailto: is part of the php code and not part of the HTML coding. So I am also understanding that this is a good way to do it. Pat

gettopreacherman

3:44 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



You could make the form action go to a simple php file that contains the email addresses. Basically, in the form you have the list of selected people to contact and a value for that...then based on that value you have an array definition in the "feedback.php" file that will carry out the mail command and send the email to the corresponding person in the list.

gliff

4:04 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Hiding an address is a mailto: link is ultimately impossible. If a user can click on it to automatically populate their email client's to: field, a smart bot can do the same thing. Those who employ these smart bots can then sell/share the address they scrape to/with anyone. As others have suggested, your best bet is a contact form where the address is hard coded in the PHP/perl/whatever script/program.

If mailto: is a must, you can help protect the address by using javacript tricks [google.com] to "hide" the address from dumb screen readers. Your best bet is to roll your own version rather than rely on existing scripts, since a popular existing script is likely to have been targeted by the bot makers. This will fool the brain dead bots, but remember there's nothing to protect yourself 100%

[edited by: jatar_k at 6:08 pm (utc) on Mar. 1, 2005]
[edit reason] fixed link [/edit]

gettopreacherman

4:32 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Ultimately, hiding the information in an array in a different file will mask that information in the source code and keep most bots out.

jatar_k

6:09 pm on Mar 1, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> So I am thinking or understanding that the mailto: is part of the php code and not part of the HTML coding. So I am also understanding that this is a good way to do it

yes Kysmiley, if your email address is already in the php then you are already doing it the right way.