<?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: image generation in PHP</title>
	<atom:link href="http://www.3till7.net/2006/03/11/image-generation-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.3till7.net/2006/03/11/image-generation-in-php/</link>
	<description>Programming, espresso, and grumbling.</description>
	<lastBuildDate>Fri, 25 Jun 2010 09:48:24 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: marvin</title>
		<link>http://www.3till7.net/2006/03/11/image-generation-in-php/comment-page-1/#comment-352411</link>
		<dc:creator>marvin</dc:creator>
		<pubDate>Sun, 16 Aug 2009 09:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.3till7.net/2006/03/11/image-generation-in-php/#comment-352411</guid>
		<description>How to save a copy of a php generated image ?</description>
		<content:encoded><![CDATA[<p>How to save a copy of a php generated image ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.3till7.net/2006/03/11/image-generation-in-php/comment-page-1/#comment-315300</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Thu, 18 Dec 2008 05:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.3till7.net/2006/03/11/image-generation-in-php/#comment-315300</guid>
		<description>Anna:  it&#039;s the only way I know of to get parameters from the URL.  Any input you get from the user should not be trusted, so any data you get from $_GET should also not be trusted.  However, you can do things to ensure the data is valid and safe.  For example, say you expect the value of $_GET[&#039;option&#039;] to be 1, 2, or 3.  Something like this would suffice:

&lt;code&gt;if ($_GET[&#039;option&#039;] == 1 &#124;&#124; $_GET[&#039;option&#039;] == 2 &#124;&#124; $_GET[&#039;option&#039;] == 3)&lt;/code&gt;
&lt;code&gt;&#160;&#160;echo &#039;Yay!&#039;;&lt;/code&gt;
&lt;code&gt;else&lt;/code&gt;
&lt;code&gt;&#160;&#160;echo &#039;Bad data!&#039;;&lt;/code&gt;

You can also use functions like &lt;a href=&quot;http://www.php.net/manual/en/function.stripslashes.php&quot; rel=&quot;nofollow&quot;&gt;stripslashes&lt;/a&gt;, &lt;a href=&quot;http://www.php.net/manual/en/function.htmlentities.php&quot; rel=&quot;nofollow&quot;&gt;htmlentities&lt;/a&gt;, and &lt;a href=&quot;http://www.php.net/manual/en/function.mysql-real-escape-string.php&quot; rel=&quot;nofollow&quot;&gt;mysql_real_escape_string&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Anna:  it&#8217;s the only way I know of to get parameters from the URL.  Any input you get from the user should not be trusted, so any data you get from $_GET should also not be trusted.  However, you can do things to ensure the data is valid and safe.  For example, say you expect the value of $_GET['option'] to be 1, 2, or 3.  Something like this would suffice:</p>
<p><code>if ($_GET['option'] == 1 || $_GET['option'] == 2 || $_GET['option'] == 3)</code><br />
<code>&nbsp;&nbsp;echo 'Yay!';</code><br />
<code>else</code><br />
<code>&nbsp;&nbsp;echo 'Bad data!';</code></p>
<p>You can also use functions like <a href="http://www.php.net/manual/en/function.stripslashes.php" rel="nofollow">stripslashes</a>, <a href="http://www.php.net/manual/en/function.htmlentities.php" rel="nofollow">htmlentities</a>, and <a href="http://www.php.net/manual/en/function.mysql-real-escape-string.php" rel="nofollow">mysql_real_escape_string</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anna</title>
		<link>http://www.3till7.net/2006/03/11/image-generation-in-php/comment-page-1/#comment-314932</link>
		<dc:creator>Anna</dc:creator>
		<pubDate>Tue, 16 Dec 2008 06:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.3till7.net/2006/03/11/image-generation-in-php/#comment-314932</guid>
		<description>If I might ask this considering I know nothing about php. What is the safety of using a $_Get function?</description>
		<content:encoded><![CDATA[<p>If I might ask this considering I know nothing about php. What is the safety of using a $_Get function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sarah</title>
		<link>http://www.3till7.net/2006/03/11/image-generation-in-php/comment-page-1/#comment-5260</link>
		<dc:creator>sarah</dc:creator>
		<pubDate>Sat, 26 Aug 2006 14:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.3till7.net/2006/03/11/image-generation-in-php/#comment-5260</guid>
		<description>That you&#039;ll put after you&#039;ve done all your configuration for the image, because those lines are what actually render the image in the browser.</description>
		<content:encoded><![CDATA[<p>That you&#8217;ll put after you&#8217;ve done all your configuration for the image, because those lines are what actually render the image in the browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osiris</title>
		<link>http://www.3till7.net/2006/03/11/image-generation-in-php/comment-page-1/#comment-5168</link>
		<dc:creator>osiris</dc:creator>
		<pubDate>Fri, 25 Aug 2006 02:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.3till7.net/2006/03/11/image-generation-in-php/#comment-5168</guid>
		<description>header( &#039;Content-type: Image/PNG&#039; );
imagepng( $image );
imagedestroy( $image );

The code above, where should I place it in image.php?</description>
		<content:encoded><![CDATA[<p>header( &#8216;Content-type: Image/PNG&#8217; );<br />
imagepng( $image );<br />
imagedestroy( $image );</p>
<p>The code above, where should I place it in image.php?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
