<?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; get</title>
	<atom:link href="http://www.alonon.net/tag/get/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>How to get page url with php</title>
		<link>http://www.alonon.net/how-to-get-page-url-with-php/</link>
		<comments>http://www.alonon.net/how-to-get-page-url-with-php/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 00:30:23 +0000</pubDate>
		<dc:creator>ALonon</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[current page url]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[page url]]></category>

		<guid isPermaLink="false">http://www.alonon.net/?p=187</guid>
		<description><![CDATA[I needed a function to get  (learn) url with php. Here are the codes. &#60;?php function curPageURL() { $pageURL = &#8216;http&#8217;; if ($_SERVER["HTTPS"] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;} $pageURL .= &#8220;://&#8221;; if ($_SERVER["SERVER_PORT"] != &#8220;80&#8243;) { $pageURL .= $_SERVER["SERVER_NAME"].&#8221;:&#8221;.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } ?&#62; To use this function write &#8230; <a href="http://www.alonon.net/how-to-get-page-url-with-php/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed a function to get  (learn) url with php.<br />
Here are the codes.</p>
<blockquote><p>&lt;?php<br />
function curPageURL() {<br />
$pageURL = &#8216;http&#8217;;<br />
if ($_SERVER["HTTPS"] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;}<br />
$pageURL .= &#8220;://&#8221;;<br />
if ($_SERVER["SERVER_PORT"] != &#8220;80&#8243;) {<br />
$pageURL .= $_SERVER["SERVER_NAME"].&#8221;:&#8221;.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];<br />
} else {<br />
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];<br />
}<br />
return $pageURL;<br />
}<br />
?&gt;</p></blockquote>
<p>To use this function write</p>
<p>&lt;? echo curPageURL(); ?&gt;</p>

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

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.alonon.net/unlimited-subcategory-with-adjacency-list-model/" title="Unlimited Subcategory with Adjacency List Model (February 1, 2009)">Unlimited Subcategory with Adjacency List Model</a> (8)</li>
	<li><a href="http://www.alonon.net/ubuntu-install-gd-support-for-apach/" title="Ubuntu install GD support for apache (December 11, 2009)">Ubuntu install GD support for apache</a> (0)</li>
	<li><a href="http://www.alonon.net/php-get-security/" title="Php Get Security (March 23, 2009)">Php Get Security</a> (0)</li>
	<li><a href="http://www.alonon.net/notice-use-of-undefined-constantvariable/" title="Notice: Use of undefined constant/variable (March 12, 2010)">Notice: Use of undefined constant/variable</a> (0)</li>
	<li><a href="http://www.alonon.net/mysql_insert_id/" title="mysql_insert_id (January 25, 2009)">mysql_insert_id</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.alonon.net/how-to-get-page-url-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>
