<?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: 8 useful server variables available in PHP</title>
	<atom:link href="http://roshanbh.com.np/2008/05/useful-server-variables-php.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:10:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: links london</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-6310</link>
		<dc:creator>links london</dc:creator>
		<pubDate>Sat, 22 Jan 2011 09:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-6310</guid>
		<description>Great post. Thanks for sharing.I am constantly searching online for articles that can aid me. Thanks!</description>
		<content:encoded><![CDATA[<p>Great post. Thanks for sharing.I am constantly searching online for articles that can aid me. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaffy</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-5584</link>
		<dc:creator>shaffy</dc:creator>
		<pubDate>Tue, 10 Aug 2010 05:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-5584</guid>
		<description>Its really useful,thanks.</description>
		<content:encoded><![CDATA[<p>Its really useful,thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sondra</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-5553</link>
		<dc:creator>Sondra</dc:creator>
		<pubDate>Fri, 16 Jul 2010 23:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-5553</guid>
		<description>Wonderful!!  Thank you, thank you!  I was able to modify with some little snipps.  Added to my fav bookmarks!</description>
		<content:encoded><![CDATA[<p>Wonderful!!  Thank you, thank you!  I was able to modify with some little snipps.  Added to my fav bookmarks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-5431</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sat, 08 May 2010 08:03:33 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-5431</guid>
		<description>Goyal, use the php function substr to remove everything before the file name or use strpos. There are really a million solutions. Try checking these out on php.net. It&#039;s an epic resource.</description>
		<content:encoded><![CDATA[<p>Goyal, use the php function substr to remove everything before the file name or use strpos. There are really a million solutions. Try checking these out on php.net. It&#8217;s an epic resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goyal</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-5152</link>
		<dc:creator>goyal</dc:creator>
		<pubDate>Sat, 13 Feb 2010 06:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-5152</guid>
		<description>i am making a website, which will translate webpages in different lanaguages. the url of the served page will be as follows: http://www.bbgoyal.com/hi/index.php. in the above example, i dont wish to captute http://www.bbgoyal.com/hi/. tell me how to capture the remaining part?</description>
		<content:encoded><![CDATA[<p>i am making a website, which will translate webpages in different lanaguages. the url of the served page will be as follows: <a href="http://www.bbgoyal.com/hi/index.php" rel="nofollow">http://www.bbgoyal.com/hi/index.php</a>. in the above example, i dont wish to captute <a href="http://www.bbgoyal.com/hi/" rel="nofollow">http://www.bbgoyal.com/hi/</a>. tell me how to capture the remaining part?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chiladelphia</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-4685</link>
		<dc:creator>chiladelphia</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-4685</guid>
		<description>echo $_SERVER[&quot;SERVER_NAME&quot;].$_SERVER[&quot;REQUEST_URI&quot;] doesn&#039;t return any javascript variables that i&#039;ve tacked on... bummer. 

any idea how i can get the #tabview=tab1</description>
		<content:encoded><![CDATA[<p>echo $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"] doesn&#8217;t return any javascript variables that i&#8217;ve tacked on&#8230; bummer. </p>
<p>any idea how i can get the #tabview=tab1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pakistani</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-3590</link>
		<dc:creator>Pakistani</dc:creator>
		<pubDate>Sat, 21 Feb 2009 11:22:12 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-3590</guid>
		<description>I studied the all 8 variables. but i need to track the previous page so dynamically i should know the root. thanks you can help me on mjaved.khan@gmail.com</description>
		<content:encoded><![CDATA[<p>I studied the all 8 variables. but i need to track the previous page so dynamically i should know the root. thanks you can help me on <a href="mailto:mjaved.khan@gmail.com">mjaved.khan@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-3541</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 10 Feb 2009 15:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-3541</guid>
		<description>Here&#039;s a tip.

Write for the user instead of the search engines. All that first paragraph said to me was &#039;php, server variables, server, php, variable, server&#039;. For Christ&#039;s sake we know what you&#039;re talking about, PHP &amp; Server Variables.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a tip.</p>
<p>Write for the user instead of the search engines. All that first paragraph said to me was &#8216;php, server variables, server, php, variable, server&#8217;. For Christ&#8217;s sake we know what you&#8217;re talking about, PHP &amp; Server Variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prevent form post request from another domain in PHP</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-1256</link>
		<dc:creator>Prevent form post request from another domain in PHP</dc:creator>
		<pubDate>Sun, 22 Jun 2008 09:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-1256</guid>
		<description>[...] time, I&#8217;ve posted the article about useful server variables in PHP. Among them, we can use HTTP_REFERRER server variables to prevent the cross domain form post [...]</description>
		<content:encoded><![CDATA[<p>[...] time, I&#8217;ve posted the article about useful server variables in PHP. Among them, we can use HTTP_REFERRER server variables to prevent the cross domain form post [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Variables del servidor útiles en PHP : Notitodo</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-880</link>
		<dc:creator>Variables del servidor útiles en PHP : Notitodo</dc:creator>
		<pubDate>Fri, 16 May 2008 11:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-880</guid>
		<description>[...] 8 useful server variables available in PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] 8 useful server variables available in PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily Find #68 &#124; TechToolBlog</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-873</link>
		<dc:creator>Daily Find #68 &#124; TechToolBlog</dc:creator>
		<pubDate>Thu, 15 May 2008 12:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-873</guid>
		<description>[...] 8 useful server variables available in PHP - If you do PHP you probably already know these. [...]</description>
		<content:encoded><![CDATA[<p>[...] 8 useful server variables available in PHP &#8211; If you do PHP you probably already know these. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 8 ??????? ???????????? ????????? ?????????? ? PHP &#124; ????????.??</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-869</link>
		<dc:creator>8 ??????? ???????????? ????????? ?????????? ? PHP &#124; ????????.??</dc:creator>
		<pubDate>Wed, 14 May 2008 23:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-869</guid>
		<description>[...] ????????: ???? ?????? ????????. [...]</description>
		<content:encoded><![CDATA[<p>[...] ????????: ???? ?????? ????????. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-862</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Wed, 14 May 2008 11:13:42 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-862</guid>
		<description>I know document_root sucks in shared hosting...you can know more about these from here as well..

http://roshanbh.com.np/2008/01/absolute-path-and-relative-path-file-inclusion-in-php.html</description>
		<content:encoded><![CDATA[<p>I know document_root sucks in shared hosting&#8230;you can know more about these from here as well..</p>
<p><a href="http://roshanbh.com.np/2008/01/absolute-path-and-relative-path-file-inclusion-in-php.html" rel="nofollow">http://roshanbh.com.np/2008/01/absolute-path-and-relative-path-file-inclusion-in-php.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JT</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-861</link>
		<dc:creator>JT</dc:creator>
		<pubDate>Wed, 14 May 2008 10:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-861</guid>
		<description>DOCUMENT_ROOT is evil. Depending on server configuration, this might have a trailing slash, or it might not. So, you might write a whole site on the basis that the trailing slash doesn&#039;t exist, only to find that it does. I find it&#039;s more effective from a portability perspective to create a globally accessible configuration constant which holds the document root path to avoid this.

REQUEST_URI suffers similarly. Again, my solution is a global config constant.

I would also install a browscap.ini and use get_browser() instead of HTTP_USER_AGENT.

Alternatively to SCRIPT_FILENAME, PHP magic constants __DIR__ and __FILE__ are very useful.</description>
		<content:encoded><![CDATA[<p>DOCUMENT_ROOT is evil. Depending on server configuration, this might have a trailing slash, or it might not. So, you might write a whole site on the basis that the trailing slash doesn&#8217;t exist, only to find that it does. I find it&#8217;s more effective from a portability perspective to create a globally accessible configuration constant which holds the document root path to avoid this.</p>
<p>REQUEST_URI suffers similarly. Again, my solution is a global config constant.</p>
<p>I would also install a browscap.ini and use get_browser() instead of HTTP_USER_AGENT.</p>
<p>Alternatively to SCRIPT_FILENAME, PHP magic constants __DIR__ and __FILE__ are very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tevan</title>
		<link>http://roshanbh.com.np/2008/05/useful-server-variables-php.html/comment-page-1#comment-859</link>
		<dc:creator>tevan</dc:creator>
		<pubDate>Wed, 14 May 2008 09:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=107#comment-859</guid>
		<description>I&#039;m not sure about the other variables listed, but I think $_SERVER[&#039;REMOTE_ADDR&#039;] is an exception in terms of its susceptibility to dangerous manipulation.  the IP address of the remote machine can be spoofed, but it will always be in IP format, and therefore it&#039;s safe to store the REMOTE_ADDR variable as-is in your database.  that said, it wouldn&#039;t hurt to validate the REMOTE_ADDR variable first, but that may not be necessary.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure about the other variables listed, but I think $_SERVER['REMOTE_ADDR'] is an exception in terms of its susceptibility to dangerous manipulation.  the IP address of the remote machine can be spoofed, but it will always be in IP format, and therefore it&#8217;s safe to store the REMOTE_ADDR variable as-is in your database.  that said, it wouldn&#8217;t hurt to validate the REMOTE_ADDR variable first, but that may not be necessary.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/19 queries in 1.313 seconds using disk: basic
Object Caching 401/401 objects using disk: basic

Served from: roshanbh.com.np @ 2012-02-09 05:39:16 -->
