<?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: Disable Direct Access to a Script With PHP</title>
	<atom:link href="http://fwebde.com/php/disable-direct-script-access/feed/" rel="self" type="application/rss+xml" />
	<link>http://fwebde.com/php/disable-direct-script-access/</link>
	<description>Helping people to make fantastic websites, whether you are a designer, a developer, or someone just who loves websites.</description>
	<lastBuildDate>Fri, 23 Jul 2010 12:14:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Maïs</title>
		<link>http://fwebde.com/php/disable-direct-script-access/comment-page-1/#comment-1713</link>
		<dc:creator>Maïs</dc:creator>
		<pubDate>Wed, 02 Jun 2010 10:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=1743#comment-1713</guid>
		<description>Thanks I was looking for that. 

But in my application I have some page that are get by iframe, so i&#039;ve add one more line and it&#039;s appear to work as i want:

if (!defined(&#039;BASEPATH&#039;) &amp;&amp;
    strtolower($_SERVER[&#039;HTTP_X_REQUESTED_WITH&#039;]) != &#039;xmlhttprequest&#039;) {
    if ($_SERVER[&#039;HTTP_REFERER&#039;] != &quot;http://---adress of my homepage---&quot;)  {
exit(&#039;Nothing to see here.&#039;);
}
}</description>
		<content:encoded><![CDATA[<p>Thanks I was looking for that. </p>
<p>But in my application I have some page that are get by iframe, so i've add one more line and it's appear to work as i want:</p>
<p>if (!defined('BASEPATH') &amp;&amp;<br />
    strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') {<br />
    if ($_SERVER['HTTP_REFERER'] != "http://---adress of my homepage---")  {<br />
exit('Nothing to see here.');<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amatoc Industries</title>
		<link>http://fwebde.com/php/disable-direct-script-access/comment-page-1/#comment-1334</link>
		<dc:creator>Amatoc Industries</dc:creator>
		<pubDate>Mon, 08 Mar 2010 08:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=1743#comment-1334</guid>
		<description>I have to wonder if there is any way to spoof the $_SERVER[&#039;HTTP_X_REQUESTED_WITH&#039;]...</description>
		<content:encoded><![CDATA[<p>I have to wonder if there is any way to spoof the $_SERVER['HTTP_X_REQUESTED_WITH']...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don Gilbert</title>
		<link>http://fwebde.com/php/disable-direct-script-access/comment-page-1/#comment-1035</link>
		<dc:creator>Don Gilbert</dc:creator>
		<pubDate>Sat, 30 Jan 2010 18:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://fwebde.com/?p=1743#comment-1035</guid>
		<description>This answers my question perfectly. I appreciate your hard work in getting and posting this information.

Have a great day!</description>
		<content:encoded><![CDATA[<p>This answers my question perfectly. I appreciate your hard work in getting and posting this information.</p>
<p>Have a great day!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
