Re: [PHP] echo text - anti-spam-spider measure



It works. =P I tested it.

Try it here! =P

http://themfund.com/snippets/test.php

On 2/27/07, Casey Chu <heavyccasey@xxxxxxxxx> wrote:
I'm not sure with both of your questions. I'm too lazy to try.

Untested: But to encode it, you would use

preg_replace_callback('~([\d\w])~', create_function('$a', 'return
"&#".ord($a[0]).";";'), $theEmail);

Hopefully that works?

On 2/27/07, John Taylor-Johnston
<John.Taylor-Johnston@xxxxxxxxxxxxxxxxxxxxx> wrote:
> How do I encode it? And would the href tag work?
>
> Casey Chu wrote:
> > ^ So put that into a <a href> tag.
> >
> > On 2/27/07, Casey Chu <heavyccasey@xxxxxxxxx> wrote:
> >> Try using Javascript? Or use all entities? For example:
> >> mailto:php-general@xxxxxxxxxxxxx would turn into
> >> &#109;&#97;&#105;&#108;&#116;&#111;&#58;&#112;&#104;&#112;&#45;&#103;&#101;&#110;&#101;&#114;&#97;&#108;&#64;&#108;&#105;&#115;&#116;&#115;&#46;&#112;&#104;&#112;&#46;&#110;&#101;&#116;
> >>
> >>
> >>
> >>
> >> On 2/27/07, John Taylor-Johnston
> >> <John.Taylor-Johnston@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >> > I need an anti-spam-spider measure for my site. Too many addresses are
> >> > getting raked. In once instance, I created a flash page:
> >> > http://erasethis.glquebec.org/English/contact.htm
> >> > But I just don't have the time to create a flash image for every
> >> single
> >> > instance, most of which come from dynamically printed PHP pages from a
> >> > MySQL database.
> >> >
> >> > Could I dynamically create a flash image, input the email and tell the
> >> > flash image to mailto:the@xxxxxxxxxxx?
> >> >
> >> > Do anyone have a solution? Does one already exist?
> >> >
> >> > My idea was to create a PHP script and output to a png. But I see many
> >> > problems, including:
> >> >
> >> > 1) How do I avoid echoing the email address in the <a href=""> tag?
> >> > 2) How would I write a png that would be long and high enough?
> >> > 3) How would the same script display the png?
> >> >
> >> > In short, I can't see far enough how to do this and avoid
> >> spider-raking
> >> > in the HTML or header the content of the image.
> >> >
> >> > Any advice, code or input would be appreciated,
> >> > John
> >> >
> >> > <a href="<?php
> >> >
> >> > #what do I put here?
> >> > $mydata->email = "me@xxxxxxxxxxxxx";
> >> > echo $??????????;
> >> >
> >> > ?>"><img src="<?php
> >> > |header('Content-type: image/png');|
> >> > #How do I display the image?
> >> >
> >> > $mydata->email = "me@xxxxxxxxxxxxx";
> >> > echo $??????????;
> >> >
> >> > ?>" width="???" height="???">
> >> >
> >> > --
> >> > PHP General Mailing List (http://www.php.net/)
> >> > To unsubscribe, visit: http://www.php.net/unsub.php
> >> >
> >> >
> >>
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

.



Relevant Pages

  • Re: [PHP] echo text - anti-spam-spider measure
    ... On Tue, February 27, 2007 11:09 pm, Casey Chu wrote: ... Could I dynamically create a flash image, ... PHP General Mailing List ... To unsubscribe, visit: http://www.php.net/unsub.php ...
    (php.general)
  • Re: openssl Vs perl encode
    ... I am trying to encode using base64 to get data for SMTP ... The @ is special in strings inside " " in Perl, so you need to escape it ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: OT: strip hebrew vowels and accents from utf-8 text
    ... use strict; ... use Encode; ... foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • [PHP] Re: (ANNOUNCE) codeSECURE 1.0 released - - Protecting PHP code
    ... we dont have an "actual example" anywhere but we can do better ... however big and i'll encode it and send it back to you. ... PHP General Mailing List ... To unsubscribe, visit: http://www.php.net/unsub.php ...
    (php.general)
  • Re: openssl Vs perl encode
    ... Perl understands the "@base" as an array here. ... So you only encode ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)