<?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>潘锦的空间 &#187; HTTP_REFERER</title>
	<atom:link href="https://www.phppan.com/tag/http_referer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.phppan.com</link>
	<description>SaaS SaaS架构 团队管理 技术管理 技术架构 PHP 内核 扩展 项目管理</description>
	<lastBuildDate>Sun, 10 May 2026 02:26:45 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>HTTP_REFERER有效和无效的情况</title>
		<link>https://www.phppan.com/2009/11/http-referer-able-noable/</link>
		<comments>https://www.phppan.com/2009/11/http-referer-able-noable/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 00:59:44 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[程序相关]]></category>
		<category><![CDATA[HTTP_REFERER]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[PHP应用]]></category>

		<guid isPermaLink="false">http://www.phppan.com/?p=370</guid>
		<description><![CDATA[HTTP_REFERER有效和无效的情况 【准备】 test.php文件 echo $_SERVER['HTT [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>HTTP_REFERER有效和无效的情况</p>
<p>【准备】<br />
test.php文件</p>
<p>echo $_SERVER['HTTP_REFERER'];</p>
<p>【有效的情况】<br />
1、以iframe 形式调用地址，如下所示</p>
<p>2、以window.open调用，打开新页面<br />
    window.open(url);</p>
<p>3、使用window.location.replace在Firefox 和Chrome下可以获取HTTP_REFERER</p>
<p>    window.location.replace(url);</p>
<p>4、使用window.location.href在Firefox 和Chrome下可以获取HTTP_REFERER<br />
    window.location.href = url;</p>
<p>5、使用A标签跳转可以获取HTTP_REFERER</p>
<p>【无效的情况】<br />
1、使用函数 file_get_contents或file等函数调用URL地址，这个地址所在的文件无法获取HTTP_REFERER</p>
<p>2、使用window.location.replace在IE6、IE7、IE8下无法获取HTTP_REFERER<br />
    window.location.replace(url);</p>
<p>3、使用window.location.href在IE6、IE7、IE8下无法获取HTTP_REFERER<br />
    window.location.href = url;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.phppan.com/2009/11/http-referer-able-noable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
