duanlu1793 2014-12-15 14:40
浏览 77

将iframe从iframe传递到wordpress网站

i have an iframe in one domain

<iframe src="www.dsfsdfdsf.com/s_usr.php?currentuserurl=http://www.sddsd.com&currentuser=test" />

the s_usr.php on other domain (wordpres site):

if (isset($_GET["currentuser"])) { $currentuser = $_GET['currentuser']; }
if (isset($_GET["currentuserurl"])) { $currentuserurl= $_GET['currentuserurl']; }
if (isset($_SERVER['HTTP_REFERER'])){ $url = $_SERVER['HTTP_REFERER']; }
if (isset($_SERVER['REMOTE_ADDR'])){ $ipaddress = $_SERVER['REMOTE_ADDR']; }

the source site give the iframe with error 403

its seems that cant send vars thro iframe if ijust add the page with no vars the iframe is ok

<iframe src="www.dsfsdfdsf.com/s_usr.php/>

so how can i send them? maybe wordpress deny this?

the short answer hostgator : "Looking into your issue it appears you are being stopped by our mod security"

  • 写回答

1条回答 默认 最新

  • doulongti5932 2014-12-15 14:46
    关注

    If the source of the iframe is on an other domain, include the domain in the src attribute:

    <iframe src="http://yourdomain.ex/s_usr.php?currentuserurl=http://www.sddsd.com&currentuser=test" />
    

    Also check the x-frame-options header of the page included in the iframe. If the value is DENY, SAMEORIGIN you can not include the page as an iframe. If this is the case you should set the option to: ALLOW-FROM: yourdomainhere

    评论

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题