<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open source blog, linux, php, python, security &#187; php security</title>
	<atom:link href="http://www.alonon.net/tag/php-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alonon.net</link>
	<description></description>
	<lastBuildDate>Wed, 02 Jun 2010 08:11:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>

   <image>
    <title>Open source blog, linux, php, python, security</title>
    <url>http://1.gravatar.com/avatar/5152c5736f5f8dd9570ffb2f9068e8ab?s=</url>
    <link>http://www.alonon.net</link>
   </image>
		<item>
		<title>Php Get Security</title>
		<link>http://www.alonon.net/php-get-security/</link>
		<comments>http://www.alonon.net/php-get-security/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 15:40:21 +0000</pubDate>
		<dc:creator>ALonon</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[php get security]]></category>
		<category><![CDATA[php security]]></category>

		<guid isPermaLink="false">http://www.alonon.net/?p=65</guid>
		<description><![CDATA[It is very important to check your data that you take with $_GET before use. You can use $_Get in some cases , in each case there are some different measures to be taken. For example if you use sth like that if(isset($_GET[ex])) include($_GET[ex]); If you use this codes, bad users can include any page &#8230; <a href="http://www.alonon.net/php-get-security/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It is very important to check your data that you take with $_GET  before use.</p>
<p>You can use $_Get in some cases ,  in each case there are some different measures to be taken.</p>
<p>For example if you use sth like that</p>
<pre lang="php">if(isset($_GET[ex]))

   include($_GET[ex]);</pre>
<p>If you use this codes, bad users can include any page that they want in your web page</p>
<p>?ex=http://www.example.com/bad_page.php</p>
<p>With this they can include any page that they want.</p>
<pre lang="php">$operation =array('add','delete','edit','save');

if (in_arrray($_GET[ex],$operation))

.. make sth...</pre>
<p>Also you can use switch,or if..</p>
<pre lang="php">switch($_GET[ex]){
case 'add':  something...
break;
case 'delete': something...
break;
default: something...</pre>
<p>with if</p>
<pre lang="php">if($_GET[ex] == "add"){

Do something..
}

else if($_GET[ex] =="delete"){
Do something..
}

else
die("possible hack attempt");</pre>

	Tags: <a href="http://www.alonon.net/tag/get/" title="get" rel="tag">get</a>, <a href="http://www.alonon.net/tag/php-get-security/" title="php get security" rel="tag">php get security</a>, <a href="http://www.alonon.net/tag/php-security/" title="php security" rel="tag">php security</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.alonon.net/how-to-get-page-url-with-php/" title="How to get page url with php (March 3, 2010)">How to get page url with php</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.alonon.net/php-get-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
