News, learn, share and discuss about Africa & other life issues with over 250, 000 members worldwide & thousands of discussion going on. CLICK HERE TO JOIN FREE and get access to write, reply, use private message & much more free!. CLICK HERE TO SAY HELLO
AfricaTopForum
May 27, 2012, 08:31:40 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Rules Search Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: How To Stop Spambots Harvesting Your Email Address  (Read 130 times)
0 Members and 1 Guest are viewing this topic.
Webmaster
Global Captain
*****
Online Online

Gender: Male
Posts: 2049



Activity
24%



« on: November 03, 2011, 08:15:44 AM »
ReplyReply


It's unfortunate, but the Internet certainly has its share of unscrupulous people. In my opinion, the worst among them are that deploy software robots that roam the web email addresses and harvesting of Web pages. These addresses are then collected in large databases and sold for the purpose of spam.

Now we all hate spam and anything that can be done to reduce it is very valuable. This is not a science and a basic knowledge of HTML and how to cut and paste you will be protected from spam bots. All that is going to use is a bit of Javascript.

Notepad first, open or any text editor and then copy and paste the following code in the file.

/ * This script provides a direct email address on a web page.
On the web page add the following: -
* /
Lock function (name)
{
var domain = "yourdomainname.com";
document.write (' '+ name + "@" + domain +' ');
}

/ * This script adds e-mail subject field.

blockersubject function (name, subject)
{
var domain = "yourdomainname.com";
document.write (' '+ name + "@" + domain +' ');
}

/ * This script is for use as an "email us" or, as in a menu system or on a page.
Insert the following website: -


blocker2 function (name, text)
{
var domain = "yourdomainname.com";
document.write (' '+ text +' ');
}

/ * This script allows the addition of a subject, but also the text can be displayed in a menu system. On its website, place the following: -
* /

blockersubject2 function (name, subject, text)
{
var domain = "yourdomainname.com";
document.write (' '+ text +' ');
}

/ / End of file.

Save the file as blocker.js in paper folders, as this script can be reused again and again as many websites as you like. You only need to change the variables in the script.

To get the script to work, there are a couple of things to do. Usually create a subdirectory for my javascript and actually call it that. Any web page JavaScript can be stored there. Keep a copy of the blocker.js file to this directory and then edit all the variables to suit your site.

Now you need to enable scripts that are called and the website has to know where they are. The easiest way to accomplish this is to have the information in the section of your document. Before the closing tag, and assuming you saved the file in a subdirectory of Javascript, insert the following line of code: -

(Insert less than sign) script type = "text / javascript" src = "javascript / Common.js"> (insert less than sign) / script>

You only need to make sure that the path to the javascript sub-directories is correct for the document. This is easy if you use Dreamweaver as you can modify the template for your site and will update all pages. If you are using PHP includes, you will need to ensure that the path is correct from its template through the directory header javascript. A little game I usually get this resolved for you.

One last thing you should keep in mind is that not everyone has JavaScript enabled. If a user returns to your page and have javascript turned off, then it will not be able to see your email address to everyone. To resolve this, enter the following code just below the area where it is assumed that the e-mail address to appear.

(Insert less than sign) noscript>

If you are seeing this, then JavaScript is enabled in your browser and you will not be able to see our email addresses. That are hidden by Javascript. You can turn your JavaScript or alternatively, in an email to youraddress the domain name dot com
(Insert less than sign) / noscript>

Be sure not to use the @ sign, or put the point of not even write the full email address correctly. You will destroy all the good work you have done.

And there you have it. A simple piece of javascript to keep your email address being harvested by the nasty little robots that roam the web.
Logged
AfricaTopForum
   

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Barack Obama’s Inaugural Address
AFRICAN NEWS BOARDS
Barack Obama 1 303 Last post September 17, 2009, 10:55:39 AM
by Perfect
CONGRATULATIONS TO THE OWNER OF THIS EMAIL ADDRESS
SCAMS DISCUSSION BOARD
Perfect 1 219 Last post September 13, 2010, 01:06:18 AM
by Perfect
14 Ways To Persuade Your Web Site Visitors To Give You Their Email Address
INTERNET MARKETING DISCUSSIONS
Perfect 0 190 Last post March 25, 2011, 04:10:06 AM
by Perfect
Scam: CONGRATULATIONS TO THE OWNER OF THIS EMAIL ADDRESS!!!
SCAMS DISCUSSION BOARD
Perfect 2 259 Last post October 17, 2011, 02:13:02 PM
by Perfect
Always collect an email address
INTERNET MARKETING DISCUSSIONS
Perfect 2 164 Last post November 01, 2011, 09:07:24 AM
by Webmaster

If you require any help or if you have any questions, challenges, comments, suggestions or criticism please don’t hesitate Click here to write,
if it is sensitive send Personal Message to Global Captain or Admin. We love to hear from members and general public.

Contact |African Discussion Forum | Powered by SMF | SMF © 2006-2011, Simple Machines