直接上代码:
<?php if($_SERVER['HTTP_REFERER']=='指定的url') { echo '<iframe src="框架网址" width="100%" height="649" frameborder="0" scrolling="auto" style="position: absolute;left:0px;"></iframe>'; } else echo '<script>location.href="如果不是,跳转提示" ;</script>'; ?>