php - How to embed google iframe? - Stack Overflow

Google seems to be blocking websites which use iframes. Of course I'm using google with its tradem

Google seems to be blocking websites which use iframes. Of course I'm using google with its trademark and embedded it in an iframe. But for some reason it never works.

Anyone knows how to bypass it?

/

Thanks

Google seems to be blocking websites which use iframes. Of course I'm using google with its trademark and embedded it in an iframe. But for some reason it never works.

Anyone knows how to bypass it?

http://jsfiddle/EgurZ/

Thanks

Share Improve this question edited Nov 15, 2011 at 16:27 evotopid 5,4393 gold badges29 silver badges41 bronze badges asked Nov 15, 2011 at 16:15 user962768user962768 231 silver badge3 bronze badges 4
  • 6 If they don't wan't that you embed their's webpage into your's I don't remend to do it, because otherwise you could get problems with them ;-) – evotopid Commented Nov 15, 2011 at 16:20
  • 4 It's an intentional click-jacking defense. – ephemient Commented Nov 15, 2011 at 16:27
  • 1 If you wan't to add a Google search in your website, use a Google Custom Search for this. – evotopid Commented Nov 15, 2011 at 16:28
  • Why do you want that?? they give you API for a lot of things, search included. Use that. – Damien Pirsy Commented Nov 15, 2011 at 16:29
Add a ment  | 

2 Answers 2

Reset to default 7

You cannot bypass it in modern browsers in any way, they simply refuse to display websites in iframe that send a X-Frame-Options header with DENY (or SAMEORIGIN is already enough). It doesn't even e down to javascript.

You can use this link instead of https://google./ , it works pretty good:

https://www.google./search?igu=1

With specific word you can use this link:

https://www.google./search?igu=1&ei=&q=YOUR+WORD

Than iframe should looks as this:

<iframe src="https://www.google./search?igu=1"></iframe>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744005411a4542257.html

相关推荐

  • php - How to embed google iframe? - Stack Overflow

    Google seems to be blocking websites which use iframes. Of course I'm using google with its tradem

    10天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信