さて、これが私の状況です。
メインサイト(フラッシュサイト)であるindex.phpというページがあります
index.phpのiframeを含むiframe.phpという別のページがあります
別のページ、test.php。内部には2つのリンクがあり、最初のリンクは直接index.phpに、別のリンクはiframe.phpにリンクしています。
私はテストしました:
最初のリンクをクリックすると、HTTP_REFERERをトレース/エコーすると、「test.php」と表示されますが、
2番目のリンクをクリックすると、HTTP_REFERERをトレース/エコーすると、「iframe.php」と表示されます。
なぜ「iframe.php」と表示されるのですか?HTTP_REFERERはiframeで機能しませんか?
2番目のリンクをクリックしたときに「test.php」を取得する方法はありますか?
:index.phpのソースコード
<html>
<head> // Some headers information
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
<?php
if(!empty($_SERVER['HTTP_REFERER'])){
?>
flashvars.link = '<?php echo $_SERVER['HTTP_REFERER']; ?>';
<?php
}
?>
var params = {};
var attributes = {};
swfobject.embedSWF("main.swf, "content", "100%", "100%", "9", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="content">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</body>
</html>
iframe.phpのソースコード
<html> headers tag
...
<body>
<center><iframe src="index.php" mce_src="index.php" frameborder="0" height="500" scrolling="no" width="500"></iframe></center>
</body>
</html>
test.phpのソースコード:
....
<a href="iframe.php" target="_blank">This is Iframe</a> <br><br>
....
<a href="index.php" target="_blank">This is normal link</a> <br><br>