Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
    0: #!/usr/bin/perl -wT
    1: 
    2: # E-mail Redirect (for protecting addresses from E-mail-Address-Collecting Bots)
    3: # by David Glick [davisagli], 6/25/2001
    4: 
    5: # when given an e-mail address in the form "[user],[domain]",
    6: # this script returns an HTTP redirect to "mailto:[user]@[domain]"
    7: 
    8: # This can be used to prevent spam-bots from finding e-mail
    9: # addresses in HTML links; for example, instead of linking to
    10: # "mailto:me@mydomain", you can link to "this_script.pl?me,mydomain"
    11: 
    12: # Comments/improvements welcome; I don't have much experience with CGI.
    13: 
    14: # Update 6/25/2001: The security risk that [bikeNomad] pointed out
    15: # shouldn't be an issue now.  Also implemented his other suggestions.
    16: # Thanks much, bikeNomad!
    17: 
    18: use strict;
    19: use warnings;
    20: use CGI qw/:standard/;
    21: 
    22: $_ = param('keywords');
    23: my ($user, $domain) = m{^([\w!$'*+-/=^.]+),([\w!$'*+-/=^.]+)$};
    24: print redirect( -uri => "mailto:$user\@$domain" )
    25:     if defined($user) && defined($domain);

In reply to E-mail Redirect (for protecting addresses from E-mail-Address-Collecting Bots) by davisagli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-19 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found