Connecting Tech Pros Worldwide Forums | Help | Site Map

ereg_replace safe e-mailadress

Evelyne
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi all,

I use:
$text=ereg_replace ('[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)*\@' .
'[_a-zA-Z0-9\-]+(\.[a-zA-Z]{1,3})', '<a
href="mailto:\\0">\\0</a>',$text);

to replace all e-mailadresses within a block of text to clickable
links. I wonder if anyone knows how to convert these clickable links
into protected adresses (I know you can't protect an e-mailadress for
100%, but encoding it a bit can help for a huge part off all the
harvest spam).

Thanx


Tim Van Wassenhove
Guest
 
Posts: n/a
#2: Jul 17 '05

re: ereg_replace safe e-mailadress


On 2005-05-04, Evelyne <evelyne.groups@gmail.com> wrote:[color=blue]
> Hi all,
>
> I use:
> $text=ereg_replace ('[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)*\@' .
> '[_a-zA-Z0-9\-]+(\.[a-zA-Z]{1,3})', '<a
> href="mailto:\\0">\\0</a>',$text);[/color]

So far for people with a domaain name that ends with .info
[color=blue]
> to replace all e-mailadresses within a block of text to clickable
> links. I wonder if anyone knows how to convert these clickable links
> into protected adresses (I know you can't protect an e-mailadress for
> 100%, but encoding it a bit can help for a huge part off all the
> harvest spam).[/color]

Simply stop displaying e-mail addresses at your site. Map all your
e-mail addresses to an integer, and then display the integer. If the
visitor then sends an e-mail, lookup the address associated witht that
number. This way you can also perform "float-control".

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
John Dunlop
Guest
 
Posts: n/a
#3: Jul 17 '05

re: ereg_replace safe e-mailadress


Evelyne wrote:
[color=blue]
> I use:[/color]

[some regex that bears no relationship to the actual syntax of e-mail
addresses in theory or in practice]
[color=blue]
> to replace all e-mailadresses within a block of text to clickable
> links. I wonder if anyone knows how to convert these clickable links
> into protected adresses (I know you can't protect an e-mailadress for
> 100%, but encoding it a bit can help for a huge part off all the
> harvest spam).[/color]

Wouldn't any encoding or whatnot of the address that is effective
against harvesters be detrimental to real people? Just look at the
Google Groups interface for a case in point.

--
Jock

Evelyne
Guest
 
Posts: n/a
#4: Jul 17 '05

re: ereg_replace safe e-mailadress


Tim Van Wassenhove wrote:[color=blue]
> On 2005-05-04, Evelyne <evelyne.groups@gmail.com> wrote:[color=green]
> > Hi all,
> >
> > I use:
> > $text=ereg_replace ('[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)*\@' .
> > '[_a-zA-Z0-9\-]+(\.[a-zA-Z]{1,3})', '<a
> > href="mailto:\\0">\\0</a>',$text);[/color]
>
> So far for people with a domaain name that ends with .info
>[/color]


The e-mailadresses that are going through this code aren't .info
addresses. In fact, they're all from three specific domains. No *.info.

[color=blue][color=green]
> > to replace all e-mailadresses within a block of text to clickable
> > links. I wonder if anyone knows how to convert these clickable[/color][/color]
links[color=blue][color=green]
> > into protected adresses (I know you can't protect an e-mailadress[/color][/color]
for[color=blue][color=green]
> > 100%, but encoding it a bit can help for a huge part off all the
> > harvest spam).[/color]
>
> Simply stop displaying e-mail addresses at your site. Map all your
> e-mail addresses to an integer, and then display the integer. If the
> visitor then sends an e-mail, lookup the address associated witht[/color]
that[color=blue]
> number. This way you can also perform "float-control".
>[/color]


For this site specially I need an idiot proof system. Therefore I was
thinking about this very simple textarea where someone enters a text
(sometimes with an e-mailaddress within the text) and then replace the
e-mailaddy with this mailto-link.
I know it wouldn't stop all the spam. These people are also checking a
catch-all (because their target group makes mistakes within the
adresses all the time), but all the little thing might help.
I'll try another approach.

evelyne

Closed Thread