Posting emails

  • musicarl
  • Born
  • Born
  • User avatar
  • Posts: 2
  • Loc: Connecticut, USA

Post 3+ Months Ago

When we lauched our site a while ago, it made sense to allow users to choose if they wanted their email posted when they made a comment or requested a song. Due to the breakout of spam, however, I'm wondering if there is any benefit to allowing users to post their emails. It is optional, but occasionally someone misreads the question on registration and has their email posted when they don't want it to.

Anyone else deal with this issue? Any thoughts are appreciated.

  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5731
  • Loc: Sub-level 28

Post 3+ Months Ago

Well, there are ways around this, to modify E-Mail addresses so that they still work in applications such as Outlook, but are harder to steal for automated scripts.

It mostly depends on the language you used to create your site.

On one of my PHP based sites, I've employed some "search-engine-friendly URLs" modifications, which converts URLs like..

Code: [ Select ]

Into something a little more friendly, like..

Code: [ Select ]

"What does this have to do with my problem?" You ask. Well, I'm so used to typing my E-Mail address to people, that I often forget about potential spammers when I write articles on my sites.

So what I've done, is to add my E-Mail address to this URL filter function (which generates the more friendly URLs) telling it to replace any instance of..

Code: [ Select ]
<a href="">


Code: [ Select ]
<a href="contact.php">

This way, even when I forget about the potential risks of having my E-Mail address plastered all over the site, it doesn't matter, because people viewnig the site will never see it, and the link will instead be replaced by a link to a page with a feedback form.

You can do something similar to this, by searching for mailto:*@*, and have it replace the @ with its hex equivalent (which is %40).

Then the following such links...

Code: [ Select ]
<a href="">

Would be converted into something like...

Code: [ Select ]
<a href="">

Spam bots won't pick up on this, but Outlook & other E-Mail clients will.

In PHP, you're basically looking at the following commands...


Along with your own function to actually replace the @ characters with %40.

This isn't an easy task to do, depending on scripts you're currently using, although even with a simple script, it can be tough to make it global to your entire site. Also, of course, I'm assuming your site is done in PHP, which it may not be. It could be ASP, JSP, Perl, or any one of several other languages, in which case I wouldn't be able to help you, but the same basic principles should be able to be applied.

If it is PHP, and you can't figure out how to implement something like this yourself, let me know, and we can work something out.

I've done this before on a few sites, and it is a hell of a job if you've not done it before (it can be even if you have done it before), so don't be put off if you don't succeed straight away.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 31 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.