SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Email Spam

  1. #1
    SitePoint Addict
    Join Date
    Jul 2002
    Location
    Sooner Nation
    Posts
    208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Email Spam

    Not sure if this has been covered

    can you do an anti spam bot with vaibles in PHP like this

    PHP Code:
    <?PHP
                    $send 
    contact;
                    
    $domain raneman;
                    
    $ext com;
                    
    ?>
    and then this:
    PHP Code:
     mailto:<?=$send?>@<?=$domain?>.<?=$ext?>
    I know the mail function works like this but does it fool spam bots?
    The only function of business is to create customer value and to innovate. - Peter Drucker

  2. #2
    SitePoint Evangelist Mr. Brownstone's Avatar
    Join Date
    May 2002
    Location
    Relative
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope. Spam-bots do not see your PHP code. Rather, they see the resulting, rendered HTML.

    A workaround using code similar to what you have shown would be to implement the spam-bot blocker in client-side JavaScript. For example:
    Code:
    <script language="javascript">
    
    function ShowEmail ( name, domain, extension, link ) {
      document.write ( '<a href="mailto:' + name + '@' + domain + '.' + extension + '">' + link + '</a>' );
    }
    
    </script>
    
    . . .
    
    <body>
    
      <script language="javascript">ShowEmail ( 'brown', 'clan-elite', 'org', 'Contact' );</script>
    
    </body>
    There are better methods of hiding emails from spam-bots. Iíll leave that to someone else to explain though, Iím off to bed.
    Of course, that's just my opinion. I could be wrong.

  3. #3
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Email Spam

    you could try something like this:

    PHP Code:
    <?php
    if (isset($_GET['email']))
    {
        
    $email str_replace(':''@'$_GET['email']);
        
    header("Location: mailto:$email");
        exit();
    }
    ?>

    <html>
    <head>
    <title>Anti Spam</title>
    </head>
    <body>
    <h1>Anti Spam - Email Protection</h1>
    <a href="<?php echo $_SERVER['PHP_SELF']; ?>?email=soonerdm:mysite.com">Mail me !</a>
    <br />
    </body>
    </html>
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  4. #4
    SitePoint Evangelist Mr. Brownstone's Avatar
    Join Date
    May 2002
    Location
    Relative
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    frezno > Hey, thatís a pretty sweet method. Thanks!
    Of course, that's just my opinion. I could be wrong.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way I can prevent the blank page when I get directed to mailto:blablabla in explorer, without using target=_blank or javascript?
    cavey

  6. #6
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alexa.com uses an interesting way to fool email grabber:

    c<RO4></RO4><dew22></dew22><Rank></Rank><cF9></cF9><dew22></dew22>ust<i 3081></i 3081 >omerservice@a<jnUp></jnUp><hk></hk>lex<DwE@Ff.aB></DwE@Ff.aB>a<jnUp 5348></jnUp 5348 >.co<hk 3448></hk 3448 >m

    this will look like this in a browser: customerservice@alexa.com
    http://www.antosch-and-lin.com - Language Learning


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •