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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog