Displaying email addresses

Status
Not open for further replies.

anthonymcg

New Member
We've got a contact section our site listing out names and phone numbers along with email addresses. I'm wondering what's the best way to combat spam bots from copying these addresses down? Should I use something like:

firstname.lastname [at] whatever.com

??

Appreciate some feedback.
 

Gavin

New Member
You could place the email address inside a script but if you are like me (lazy) just add an image that states the email address.

How about a contact form?
 

mneylon

Administrator
Staff member
I used to use a simple php script to handle it ie. on the page you had user => script which converts to user@domain

It stopped a lot of the junk :)
 

anthonymcg

New Member
You could place the email address inside a script but if you are like me (lazy) just add an image that states the email address.

How about a contact form?

Images aren't really an option because of usability.

On the contact form, not too sure how I'd make that work inside our existing CMS. Will look into it.

I used to use a simple php script to handle it ie. on the page you had user => script which converts to user@domain

It stopped a lot of the junk :)

How does that work? The script is parsed and the email is shown normally anyway?
 

mneylon

Administrator
Staff member
Instead of a mailto link you use a href one... The script does the conversion for you
 

louie

New Member
Something like this should do it:

PHP:
email: <a title="info" rel="domain.ie" href="mailto:info[at symbol]domain.ie" onclick="this.href='mailto:'+this.getAttribute('title')+'@'+this.getAttribute('rel')"><span>Send Us an Email</span></a>
 

ButtermilkJack

New Member
You could place the email address inside a script...
here's one I found a few years back and have been using it eversince. Can't remember where I got it but no doubt on some helpful tutorial site :)

<script type="text/javascript">

<!--
var username = "name";
var hostname = "domain.xx";
var linktext = username + "@" + hostname;
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + ">" + linktext + "</a>")
//-->
</script>


Probably similar to ideas already mentioned above but it's a nice little script I think.
 
Status
Not open for further replies.
Top