﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Knowledgebase » Knowledgebase » Programming » Other programming issues</title><generator>InstantKB.NET 2.0.4</generator><description>Knowledgebase</description><link>http://www.webhost4life.com/HostingKB/</link><webMaster>kb@webhost4life.com</webMaster><lastBuildDate>Fri, 20 Nov 2009 19:24:30 GMT</lastBuildDate><ttl>20</ttl><item><title>How do I prevent spammers to use my contact form to send spam mail ?</title><link>http://www.webhost4life.com/HostingKB/Goto50128.aspx</link><description>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" style="" /&gt;&lt;meta content="Word.Document" name="ProgId" style="" /&gt;&lt;meta content="Microsoft Word 11" name="Generator" style="" /&gt;&lt;meta content="Microsoft Word 11" name="Originator" style="" /&gt;A spambot is an automated computer program designed to assist in the sending of spam. Some of spambot is designed to attack contact form. To prevent spammers use your contact form, you need to customize your form so that only human visitor, not a spambot, can use your form. You will need some programming skill to perform the customization.&lt;br style="" /&gt;&lt;br /&gt;&lt;p style=""&gt;Here are some effective methods:&lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;ol type="1" start="1" style=""&gt;&lt;li style=""&gt;Creating a hidden field inside your contact form and the default value is set to empty. If it is spambots keep submitting your contact form, it will also submit value to the hidden field. You can verify the hidden field to identify whether it is spambot.&lt;br style="" /&gt;&lt;/li&gt;&lt;li style=""&gt;Similar to method 1. But, this time, you add an input box to your contact form and set the input box as invisible by using css. This way can further confuse and increase the workload of the attacker.&lt;/li&gt;&lt;li style=""&gt;Similar to method 1. But this time, you add 2 hidden fields having similar names such as token1 and token2. Populate token1 with a random value. Populate token2 with a reversed string and then validate upon POST. Many spammers will post data to both fields and never expect validation to sort of mirror each other.&lt;/li&gt;&lt;li style=""&gt;Counting the occurrence of the string that posted from different fields. Spambots often post the same data to multiple fields, often "http://" or "[url". Most validation scripts loop through all the posted variables. When looping through the posted values, conditionally increment a counter.&lt;/li&gt;&lt;li style=""&gt;Using session. Generate a random string when the visitor first arrives at the site, and save it in a session variable. On the Contact form, break up the random string into about 4 chunks, each displayed using a different font color. Ask the user to enter the red characters in a box near the submit button. Validate the submitted data and generate an error message if the wrong value is posted. Robots won't be able to guess the random string.&lt;/li&gt;&lt;li style=""&gt;Limit form submission from a specific IP address within a time period.&lt;/li&gt;&lt;li style=""&gt;Making use of CAPTCHA. However, CAPTCHA can be hard to read even for humans. And if implemented wrong, they will be read by the bots&lt;/li&gt;&lt;/ol&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;p style=""&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=""&gt;For details of method 2, please refer to&lt;a href="http://klauskjeldsen.dk/2007/07/19/avoid-html-form-spam-using-css/" style=""&gt;&lt;br /&gt;http://klauskjeldsen.dk/2007/07/19/avoid-html-form-spam-using-css/&lt;/a&gt;&lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;p style=""&gt;For details of method 1, 3, 4, 5 and 6, please refer to&lt;a href="http://www.hockinson.com/index.php?s=182" style=""&gt;&lt;br /&gt;http://www.hockinson.com/index.php?s=182&lt;/a&gt;&lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt;  &lt;p style=""&gt;For details of method 7, please refer to&lt;a href="http://www.online-tech-tips.com/web-site-tips/use-a-captcha-to-prevent-comment-spam-or-to-hide-an-email-address-and-help-digitize-books-at-the-same-time/" style=""&gt;&lt;br /&gt;http://www.online-tech-tips.com/web-site-tips/use-a-captcha-to-prevent-comment-spam-or-to-hide-an-email-address-and-help-digitize-books-at-the-same-time/&lt;/a&gt;&lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;p style=""&gt; &lt;/p&gt; &lt;a href="http://www.stevedawson.com/article0015.php" style="" /&gt;</description><pubDate>Tue, 11 Aug 2009 16:55:18 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Why cannot upload file through my web site?</title><link>http://www.webhost4life.com/HostingKB/Goto50493.aspx</link><description>When upload file through web site, web site user need to have write permission for the folder which used to store file.&lt;br /&gt;Please click &amp;lt;&lt;a href="http://www.webhost4life.com/HostingKB/KnowledgebaseArticle50482.aspx"&gt;here&lt;/a&gt;&gt; for instruction of how to set permission.&lt;br /&gt;&lt;br /&gt;Windows Account :&lt;br /&gt;For ASP.NET application, web user is "Network Service" (for win2003 &amp;amp; win2008) and "ASPNET" (for win2000)&lt;br /&gt;For other applications, web user is "IUSR_memberID"&lt;br /&gt;&lt;br /&gt;Linux Account:&lt;br /&gt;Please change folder permission to 777&lt;br /&gt;&lt;br /&gt;*For security reason, please only grant write permission for the folder(s) which need it.&lt;br /&gt;</description><pubDate>Mon, 29 Jun 2009 05:22:57 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Website using MySQL return "Too many connections" error</title><link>http://www.webhost4life.com/HostingKB/Goto50459.aspx</link><description>Your website may have established too many connections to MySQL database. When the number of open connection reach the limit, "Too many connections" error will return. &lt;br /&gt;&lt;br /&gt;To fix it temporary, you can login your Hosting Control Panel -&gt; Database -&gt; MySQL Admin, click the "Flush Host" button beside your database.&lt;br /&gt;&lt;br /&gt;* IMPORTANT: You need to check your script whether all opened connections are closed. Otherwise the same problem will occur again and again when your site being visited&lt;br /&gt;</description><pubDate>Thu, 07 May 2009 13:42:48 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Why is my ASP page returning ...must be updateable query.. messages when trying to make changes to MS Access DB?</title><link>http://www.webhost4life.com/HostingKB/Goto50063.aspx</link><description>&lt;font face="Arial"&gt;This happens when your .MDB file does not have WRITE permissions.  To fix the problem, go to your Hosting Control Panel, go to Security, go to File Permission on the left hand menu.  In there, browse to the folder that contains your .mdb file and give the .mdb file &lt;strong&gt;Read + Write&lt;/strong&gt; to user IUSR_MEMBERID for the .MDB file. &lt;/font&gt;&lt;p align="left"&gt;&lt;font face="Arial"&gt;&lt;strong&gt;If this still give you error, you'll have to give write permission to the ENTIRE folder that contains the database .MDB file.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;</description><pubDate>Wed, 24 Dec 2008 11:09:23 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>My page returns a ODBC not found error?</title><link>http://www.webhost4life.com/HostingKB/Goto50051.aspx</link><description>&lt;font face="Arial"&gt;You get this error because you did NOT setup an ODBC connection yet.  Login to Control Panel and click on the Database -&gt; &lt;strong&gt;Create ODBC/DSN&lt;/strong&gt; icon to create an ODBC connection. &lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;font face="Arial" color="#0000ff" size="2" /&gt;&lt;/u&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&lt;font face="Arial" color="#0000ff" size="2" /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Wed, 24 Dec 2008 10:55:07 GMT</pubDate><dc:creator>Mark</dc:creator></item></channel></rss>