duanlian1960 2019-02-11 19:07
浏览 375
已采纳

是否可以使用拒绝的x-frame-option标头获取网站的HTML代码?

I need to show Envato Elements content into my site. I have tested the iframe tag, but site has refused the connection. I have tested the object tag, but no success. I have tested the PHP's file_get_contents function, but nothing again. However, there are some sites showing the Envato Elements content.

I have done a little research and found out about X-Frame-Options header. Envato Elements is using it to deny the content. I know everything about that, but there are some WordPress plugins exist that can get the source of popular sites like Envato and any WordPress sites. Envato is not on WordPress, but that plugin can still show its content.

So my question is how that plugin is doing it? Is there any way I can do it too?

plugin link :‌ https://codecanyon.net/item/wp-content-crawler-get-content-from-almost-any-site-automatically/15983018

  • 写回答

1条回答 默认 最新

  • doujupa7567 2019-02-11 20:09
    关注

    I actually wrote a plugin that's designed to import content into your WordPress site. Note, it's only intended for use with content you have a license to use. It actually works* with Envato, but the site quickly redirects/reloads with this message:

    enter image description here

    This indicates the assets are served from a whitelist, and of course my nobody little server isn't on that whitelist.

    So the only way to embed this into your site would be to Contact them or directly inquire their Partnerships & Business development team: business@envato.com and get approval/access to do so. Honestly, given Envato's business model - I wouldn't go in with high hopes outside of having an outstanding and well-documented partnership model in mind.

    Sites that block/deny/redirect non-whitelisted requests to their site generally have good reasons to do so, and so they only ethical way around it is to contact the site owner and request a whitelist with some sort of partnership proposal.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常
  • ¥15 关于风控系统,如何去选择
  • ¥15 这款软件是什么?需要能满足我的需求
  • ¥15 SpringSecurityOauth2登陆前后request不一致