/*++ /* NAME /* hideaddr 1 /* SUMMARY /* Encodes an email address using HTML numeric character references. /* SYNOPSIS /* hideraddr /* DESCRIPTION /* In order to prevent web-based email address harvesters from /* detecting email addresses in web pages, hideaddr converts /* an address into the HTML numeric codes for each character. /* It prints the numeric character references on standard output /* so the code string can be redirected or cut and pasted into /* an HTML file. /* /* You need a C compiler to build hideaddr. Type /* /* $ cc -o hideaddr hideaddr.c /* /* Of course, encoding your email address in this way is not /* a guarantee that address harvesters won't find it. Any of the /* tricks people use (e.g. "kyle at example dot com") to hide /* email addresses on web pages are susceptible to smart /* harvesters, but this has the advantage of looking normal to /* users through their browsers and allowing you to create /* hyperlinks for your email addresses. /* /* After you've built the utility, execute it as follows: /* /* $ ./hideaddr kdent@example.com /* /* which will produce a lengthy string like so: /* /* kdent@example.com /* /* Cut and paste this long string of characters into your /* web page. A mailto link should look something like this: /* /* /* kdent@example.com /* /* /* If this displays unwanted spaces around the address in your /* web page, put it all on one line. /* /* AUTHOR /* Kyle Dent /* January 28, 2003 /*--*/ #include int main(int argc, char **argv) { int n; if ( argc != 2 ) { fprintf(stderr, "Usage: hideaddr \n"); exit(1); } for ( n = 0; n < strlen(argv[1]); n++ ) { printf("&#%d;", argv[1][n]); } puts(""); }