{"id":136,"date":"2006-12-08T19:27:47","date_gmt":"2006-12-08T17:27:47","guid":{"rendered":"https:\/\/alax.info\/blog\/136"},"modified":"2009-03-24T11:46:12","modified_gmt":"2009-03-24T09:46:12","slug":"captcha-for-asp","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/136","title":{"rendered":"CAPTCHA for ASP"},"content":{"rendered":"<p>CAPTCHA stands for &#8220;<em>Completely Automated Public Turing test to tell Computers and Humans Apart<\/em>&#8221; which is more known to public as a verification code one needs to enter in order to proceed with certain action. The challenge is aimed to prevent from automated operation, such as, for instance, user registration, spam or data mining.<\/p>\n<p>Alax.Info Captcha Module offers a COM object to generate CAPTCHA <a href=\"http:\/\/www.libpng.org\/pub\/png\/\">PNG (Portable Network Graphics)<\/a> images:<\/p>\n<p><img decoding=\"async\" id=\"image137\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/08-image001.png\" alt=\"08-image001.png\" \/><\/p>\n<p><!--more--><\/p>\n<p>The images are generated using a few lines of code:<\/p>\n<blockquote><p>&lt;%@Language=&#8221;JScript&#8221;%&gt;<br \/>\n&lt;%<br \/>\n&#8230;<br \/>\nCaptchaText = (1000 + Math.random() * 9000).toFixed(0);<br \/>\nCaptchaImage = Server.CreateObject(&#8220;Alax.Info.Captcha.Image&#8221;);<br \/>\nCaptchaImage.Text = CaptchaText;<br \/>\nCaptchaImageFileName = &#8220;image.png&#8221;; \/\/ TODO: Choose random name, esp. per-session<br \/>\nCaptchaFileStream = Server.CreateObject(&#8220;Alax.Info.Captcha.FileStream&#8221;);<br \/>\nCaptchaFileStream.Path = Server.MapPath(CaptchaImageFileName);<br \/>\nCaptchaImage.Create(CaptchaFileStream);<br \/>\n&#8230;<br \/>\n%&gt;<br \/>\n&#8230;<br \/>\n&lt; img xsrc=&#8221;&lt;%=CaptchaImageFileName%&gt;?rand&lt;%=Math.random().toString()%&gt;&#8221; \/&gt;<\/p><\/blockquote>\n<p><span style=\"font-style: italic\">Alax.Info.Captcha.Image<\/span> COM object exposes the following properties and methods:<\/p>\n<ul>\n<li>Properties\n<ul>\n<li>Width, Height &#8211; dimensions of generated image in pixels<\/li>\n<\/ul>\n<ul>\n<li>BackColor, ForeColor &#8211; background and foreground (junk lines and font) colors<\/li>\n<\/ul>\n<ul>\n<li>BorderColor, BorderWidth &#8211; image border properties<\/li>\n<\/ul>\n<ul>\n<li>Text &#8211; text to embed into the image<\/li>\n<\/ul>\n<\/li>\n<li>Methods\n<ul>\n<li>Create &#8211; generate image into stream<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The image may be generated into any compatible implementation of COM <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/ms890686.aspx\">IStream<\/a> interface, the module also provides <span style=\"font-style: italic\">Alax.Info.Captcha.FileStream<\/span> COM object to provide IStream implementation to write image into local file.<\/p>\n<p>Application Name: Alax.Info Captcha Module<br \/>\nLicense: Free for personal use, request commercial licenses via email or <a href=\"https:\/\/alax.info\/blog\/about\/\">contact form<\/a><br \/>\nLatest Version: 1.0.0.111<br \/>\nDownload Link: <a id=\"p123\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/12\/captchasetup-100111.msi\">Alax.Info Captcha Module 1.0.0.111<\/a> (263K)<\/p>\n<p>See Also:<\/p>\n<ul>\n<li><a href=\"http:\/\/en.wikipedia.org\/wiki\/CAPTCHA\">Wikipedia article on CAPTCHA<\/a><\/li>\n<li>More CAPTCHAs on the net:\n<ul>\n<li><a href=\"http:\/\/www.google.com\/search?q=asp+captcha\">ASP CAPTCHAs on Google<\/a><\/li>\n<li><a href=\"http:\/\/sourceforge.net\/projects\/asp-captcha\">The ASP CAPTCHA Project<\/a><\/li>\n<li><a href=\"http:\/\/www.codeproject.com\/aspnet\/CaptchaImage.asp\">ASP.NET CAPTCHA Image on CodeProject.com<\/a><\/li>\n<li><a href=\"http:\/\/www.codeproject.com\/aspnet\/CaptchaControl.asp\">ASP.NET CAPTCHA Server Control on CodeProject.com<\/a><\/li>\n<li><a href=\"http:\/\/captchas.net\/sample\/asp\/\">Sample ASP Implementation on Captchas.net<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CAPTCHA stands for &#8220;Completely Automated Public Turing test to tell Computers and Humans Apart&#8221; which is more known to public as a verification code one needs to enter in order to proceed with certain action. The challenge is aimed to prevent from automated operation, such as, for instance, user registration, spam or data mining. Alax.Info&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/136\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-atl","category-utilities"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}