<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Simple CAPTCHA Tutorial with Zend Framework</title>
	<atom:link href="http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/</link>
	<description>Wenbert Del Rosario: PHP, MySQL, Javascript, MVC, Zend Framework, AJAX, jQuery.</description>
	<lastBuildDate>Thu, 11 Mar 2010 20:49:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jeuelc</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11848</link>
		<dc:creator>jeuelc</dc:creator>
		<pubDate>Tue, 20 Oct 2009 23:22:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11848</guid>
		<description>Thank you for this. It helped me a lot.</description>
		<content:encoded><![CDATA[<p>Thank you for this. It helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xDave</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11765</link>
		<dc:creator>xDave</dc:creator>
		<pubDate>Fri, 11 Sep 2009 12:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11765</guid>
		<description>hi, thnx for nice tutor, i got the same bug as some users here, in my case problem was that i use layout in my application. Here is updated init function() that solves that.
&lt;code&gt;
public function init() {
    $this-&gt;_helper-&gt;layout-&gt;disableLayout();
    $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender();
}
&lt;/code&gt;
You will know that you have the same problem, if you call your url of image (which now returns only title of url itself) in img html tag, then move the area which should be the image to your desktop, it will appear as html file, and when you open it,you can see bad bug content.</description>
		<content:encoded><![CDATA[<p>hi, thnx for nice tutor, i got the same bug as some users here, in my case problem was that i use layout in my application. Here is updated init function() that solves that.<br />
<code><br />
public function init() {<br />
    $this-&gt;_helper-&gt;layout-&gt;disableLayout();<br />
    $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender();<br />
}<br />
</code><br />
You will know that you have the same problem, if you call your url of image (which now returns only title of url itself) in img html tag, then move the area which should be the image to your desktop, it will appear as html file, and when you open it,you can see bad bug content.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codeholic</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11689</link>
		<dc:creator>codeholic</dc:creator>
		<pubDate>Sun, 19 Jul 2009 15:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11689</guid>
		<description>Nice code!I try this and it&#039;s work fine in zf 1.5, but not work in zf 1.8. Can you give me a suggestion? Thanks !</description>
		<content:encoded><![CDATA[<p>Nice code!I try this and it&#8217;s work fine in zf 1.5, but not work in zf 1.8. Can you give me a suggestion? Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend Framework és Captcha &#8211; egyszerű céges oldal (Demo Kft) &#8211; Kapcsolat űrlap &#8211; biztonság IV.rész &#171; Simon András blogja</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11609</link>
		<dc:creator>Zend Framework és Captcha &#8211; egyszerű céges oldal (Demo Kft) &#8211; Kapcsolat űrlap &#8211; biztonság IV.rész &#171; Simon András blogja</dc:creator>
		<pubDate>Sat, 30 May 2009 11:38:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11609</guid>
		<description>[...] én is rákerestem a captcha Zend framework kulcszavakra googleban, ekkor bukkantam a következő http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/ oldalra, tökéletes egyszerű kis megoldás, annyi bajom volt vele, hogy a generatecaptchaAction() [...]</description>
		<content:encoded><![CDATA[<p>[...] én is rákerestem a captcha Zend framework kulcszavakra googleban, ekkor bukkantam a következő <a href="http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/" rel="nofollow">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/</a> oldalra, tökéletes egyszerű kis megoldás, annyi bajom volt vele, hogy a generatecaptchaAction() [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wenbert</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11495</link>
		<dc:creator>Wenbert</dc:creator>
		<pubDate>Fri, 23 Jan 2009 09:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11495</guid>
		<description>@navdeep try to var_dump the baseUrl(). make sure that works.
You should see an image when you go to: http://mysite.com/imagegenerator/generatecaptcha</description>
		<content:encoded><![CDATA[<p>@navdeep try to var_dump the baseUrl(). make sure that works.<br />
You should see an image when you go to: <a href="http://mysite.com/imagegenerator/generatecaptcha" rel="nofollow">http://mysite.com/imagegenerator/generatecaptcha</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: navdeep</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11494</link>
		<dc:creator>navdeep</dc:creator>
		<pubDate>Fri, 23 Jan 2009 05:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11494</guid>
		<description>hi... i m unable to see the captcha image....
no captcha code is here.....

i just do thses things nothing else....
1.
my contoller:

_helper-&gt;viewRenderer-&gt;setNoRender();
}
 
public function generatecaptchaAction()
{
 
//Let&#039;s generate a totally random string using md5
$md5_hash = md5(rand(0,999));
//We don&#039;t need a 32 character long string so we trim it down to 5
$security_code = substr($md5_hash, 15, 5);
 
$_SESSION[&#039;captcha_code&#039;] = $security_code;
 
//Set the image width and height
$width = 100;
$height = 20;
 
//Create the image resource
$image = ImageCreate($width, $height);
 
//We are making three colors, white, black and gray
$white = ImageColorAllocate($image, 255, 255, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$grey = ImageColorAllocate($image, 204, 204, 204);
 
//Make the background black
ImageFill($image, 0, 0, $black);
 
//Add randomly generated string in white to the image
ImageString($image, 3, 30, 3, $security_code, $white);
 
//Throw in some lines to make it a little bit harder for any bots to break
ImageRectangle($image,0,0,$width-1,$height-1,$grey);
imageline($image, 0, $height/2, $width, $height/2, $grey);
imageline($image, $width/2, 0, $width/2, $height, $grey);
 
//Tell the browser what kind of file is come in
header(&quot;Content-Type: image/jpeg&quot;);
 
//Output the newly created image in jpeg format
ImageJpeg($image);
}
}


2: my view file:


3: my form:

				Captcha Code:
				&lt;img src=&quot;baseUrl();?&gt;/imagegenerator/generatecaptcha&quot; /&gt;
				Enter Code Here:
				
				
			


PLEASE HELP ME GUYS.....I am not having Captcha image....and sumbit button not working????</description>
		<content:encoded><![CDATA[<p>hi&#8230; i m unable to see the captcha image&#8230;.<br />
no captcha code is here&#8230;..</p>
<p>i just do thses things nothing else&#8230;.<br />
1.<br />
my contoller:</p>
<p>_helper-&gt;viewRenderer-&gt;setNoRender();<br />
}</p>
<p>public function generatecaptchaAction()<br />
{</p>
<p>//Let&#8217;s generate a totally random string using md5<br />
$md5_hash = md5(rand(0,999));<br />
//We don&#8217;t need a 32 character long string so we trim it down to 5<br />
$security_code = substr($md5_hash, 15, 5);</p>
<p>$_SESSION['captcha_code'] = $security_code;</p>
<p>//Set the image width and height<br />
$width = 100;<br />
$height = 20;</p>
<p>//Create the image resource<br />
$image = ImageCreate($width, $height);</p>
<p>//We are making three colors, white, black and gray<br />
$white = ImageColorAllocate($image, 255, 255, 255);<br />
$black = ImageColorAllocate($image, 0, 0, 0);<br />
$grey = ImageColorAllocate($image, 204, 204, 204);</p>
<p>//Make the background black<br />
ImageFill($image, 0, 0, $black);</p>
<p>//Add randomly generated string in white to the image<br />
ImageString($image, 3, 30, 3, $security_code, $white);</p>
<p>//Throw in some lines to make it a little bit harder for any bots to break<br />
ImageRectangle($image,0,0,$width-1,$height-1,$grey);<br />
imageline($image, 0, $height/2, $width, $height/2, $grey);<br />
imageline($image, $width/2, 0, $width/2, $height, $grey);</p>
<p>//Tell the browser what kind of file is come in<br />
header(&#8220;Content-Type: image/jpeg&#8221;);</p>
<p>//Output the newly created image in jpeg format<br />
ImageJpeg($image);<br />
}<br />
}</p>
<p>2: my view file:</p>
<p>3: my form:</p>
<p>				Captcha Code:<br />
				&lt;img src=&#8221;baseUrl();?&gt;/imagegenerator/generatecaptcha&#8221; /&gt;<br />
				Enter Code Here:</p>
<p>PLEASE HELP ME GUYS&#8230;..I am not having Captcha image&#8230;.and sumbit button not working????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wenbert</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11359</link>
		<dc:creator>Wenbert</dc:creator>
		<pubDate>Wed, 31 Dec 2008 01:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11359</guid>
		<description>@Jyotsa, make sure you have defined $_SESSION[&#039;captcha_code&#039;].

Try to do a $_SESSION[&#039;captcha_code&#039;] = NULL;

See if that works. If not, paste2.org your code and email me the link so that I can take a look at it.</description>
		<content:encoded><![CDATA[<p>@Jyotsa, make sure you have defined $_SESSION['captcha_code'].</p>
<p>Try to do a $_SESSION['captcha_code'] = NULL;</p>
<p>See if that works. If not, paste2.org your code and email me the link so that I can take a look at it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jyotsna</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11358</link>
		<dc:creator>Jyotsna</dc:creator>
		<pubDate>Tue, 30 Dec 2008 17:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11358</guid>
		<description>Hi,

Nice tutorial, thanks for sharing with us. I got it working. But the controller where I am using this is not recognizing the SESSION created in another (Image) controller. 

I got this error:
Notice: Undefined index: captcha_code in C:\AppServ\www\super2\controllers\TestController.php on line 42

Can you please help me to solve this problem.

Thanks,
Jyotsna.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Nice tutorial, thanks for sharing with us. I got it working. But the controller where I am using this is not recognizing the SESSION created in another (Image) controller. </p>
<p>I got this error:<br />
Notice: Undefined index: captcha_code in C:\AppServ\www\super2\controllers\TestController.php on line 42</p>
<p>Can you please help me to solve this problem.</p>
<p>Thanks,<br />
Jyotsna.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gimly</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11296</link>
		<dc:creator>gimly</dc:creator>
		<pubDate>Sun, 21 Dec 2008 13:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11296</guid>
		<description>Thanks alot - great tutorial!

@Sudarshan You can disable layout this way: $this-&gt;_helper-&gt;layout-&gt;disableLayout();</description>
		<content:encoded><![CDATA[<p>Thanks alot &#8211; great tutorial!</p>
<p>@Sudarshan You can disable layout this way: $this-&gt;_helper-&gt;layout-&gt;disableLayout();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diptesh Patel</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-11193</link>
		<dc:creator>Diptesh Patel</dc:creator>
		<pubDate>Fri, 05 Dec 2008 13:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-11193</guid>
		<description>Hi, All 

Here in this code Header is defined like this 
header(&quot;Content-Type: image/jpeg&quot;);
So it will might not give you the result 
Try this header instead of :

$this-&gt;_response-&gt;setHeader(&#039;Content-Type&#039;, &#039;image/jpeg&#039;);</description>
		<content:encoded><![CDATA[<p>Hi, All </p>
<p>Here in this code Header is defined like this<br />
header(&#8220;Content-Type: image/jpeg&#8221;);<br />
So it will might not give you the result<br />
Try this header instead of :</p>
<p>$this-&gt;_response-&gt;setHeader(&#8216;Content-Type&#8217;, &#8216;image/jpeg&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edazevedo</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-10362</link>
		<dc:creator>edazevedo</dc:creator>
		<pubDate>Sun, 09 Nov 2008 17:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-10362</guid>
		<description>Problem solved. I&#039;ve just installed the PHP GD-extension and it started working.

I&#039;m using ubuntu, so I get the package with:
sudo apt-get install php5-gd

and restarted my apache server:
sudo /etc/init.d/apache2 restart

and that&#039;s it.</description>
		<content:encoded><![CDATA[<p>Problem solved. I&#8217;ve just installed the PHP GD-extension and it started working.</p>
<p>I&#8217;m using ubuntu, so I get the package with:<br />
sudo apt-get install php5-gd</p>
<p>and restarted my apache server:<br />
sudo /etc/init.d/apache2 restart</p>
<p>and that&#8217;s it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edazevedo</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-10361</link>
		<dc:creator>edazevedo</dc:creator>
		<pubDate>Sun, 09 Nov 2008 17:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-10361</guid>
		<description>I&#039;ve got my zend framework up and running :)
Controllers are working ok. 
Isn&#039;t ImageCreate() a function from the PHP GD-extension, or other? 
It just don&#039;t seem to be from the Zend Framework library.

Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got my zend framework up and running :)<br />
Controllers are working ok.<br />
Isn&#8217;t ImageCreate() a function from the PHP GD-extension, or other?<br />
It just don&#8217;t seem to be from the Zend Framework library.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wenbert</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-10348</link>
		<dc:creator>Wenbert</dc:creator>
		<pubDate>Sun, 09 Nov 2008 04:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-10348</guid>
		<description>@edazevedo make sure that your ImagegeneratorController is working. You do not have to &quot;include&quot; this function. It simply works once you have your Zend Framework setup in you application. See http://framework.zend.com/manual/en/zend.controller.html for more information.</description>
		<content:encoded><![CDATA[<p>@edazevedo make sure that your ImagegeneratorController is working. You do not have to &#8220;include&#8221; this function. It simply works once you have your Zend Framework setup in you application. See <a href="http://framework.zend.com/manual/en/zend.controller.html" rel="nofollow">http://framework.zend.com/manual/en/zend.controller.html</a> for more information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edazevedo</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-10339</link>
		<dc:creator>edazevedo</dc:creator>
		<pubDate>Sat, 08 Nov 2008 21:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-10339</guid>
		<description>I&#039;m getting this error
&quot;Call to undefined function ImageCreate()&quot;

How do I include this function?

Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting this error<br />
&#8220;Call to undefined function ImageCreate()&#8221;</p>
<p>How do I include this function?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manjava</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-9185</link>
		<dc:creator>manjava</dc:creator>
		<pubDate>Mon, 29 Sep 2008 20:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-9185</guid>
		<description>someone can you explain for me how can generate the code the captcha with zend framework 1.6

thanks</description>
		<content:encoded><![CDATA[<p>someone can you explain for me how can generate the code the captcha with zend framework 1.6</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkhorse</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-9168</link>
		<dc:creator>darkhorse</dc:creator>
		<pubDate>Sun, 28 Sep 2008 14:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-9168</guid>
		<description>anyone can show how to use the internal Zend_Captcha to generate an image?</description>
		<content:encoded><![CDATA[<p>anyone can show how to use the internal Zend_Captcha to generate an image?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wenbert</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-8698</link>
		<dc:creator>Wenbert</dc:creator>
		<pubDate>Thu, 11 Sep 2008 16:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-8698</guid>
		<description>Snowcore, I haven&#039;t used Zend_Captcha yet...</description>
		<content:encoded><![CDATA[<p>Snowcore, I haven&#8217;t used Zend_Captcha yet&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Snowcore</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-8695</link>
		<dc:creator>Snowcore</dc:creator>
		<pubDate>Thu, 11 Sep 2008 14:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-8695</guid>
		<description>Thanks.
Do you like Zend_Captcha ?</description>
		<content:encoded><![CDATA[<p>Thanks.<br />
Do you like Zend_Captcha ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wenbert</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-7839</link>
		<dc:creator>Wenbert</dc:creator>
		<pubDate>Thu, 21 Aug 2008 03:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-7839</guid>
		<description>@Sudarshan, I am not sure. I have not tested this with the layouts. But I am thinking that you need to &quot;disable&quot; layouts for the ImagegeneratorController and its actions because the HTML tags in the Layout will be rendered with the images.

Instead of outputting the image, the Layout interferes with the HTML tags, etc. because the layout is parsed first before the action (the image) is rendered.</description>
		<content:encoded><![CDATA[<p>@Sudarshan, I am not sure. I have not tested this with the layouts. But I am thinking that you need to &#8220;disable&#8221; layouts for the ImagegeneratorController and its actions because the HTML tags in the Layout will be rendered with the images.</p>
<p>Instead of outputting the image, the Layout interferes with the HTML tags, etc. because the layout is parsed first before the action (the image) is rendered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan</title>
		<link>http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/comment-page-1/#comment-7829</link>
		<dc:creator>Sudarshan</dc:creator>
		<pubDate>Wed, 20 Aug 2008 13:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ekini.net/2007/10/29/simple-captcha-with-zend-framework/#comment-7829</guid>
		<description>Hello,
I am using this code in a sample test I am working on.
In the application the Layout is used .But when the layout is enabled the image is not  generated.Without layout image is generated.
What should I do?</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I am using this code in a sample test I am working on.<br />
In the application the Layout is used .But when the layout is enabled the image is not  generated.Without layout image is generated.<br />
What should I do?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
