4

I have a webpage within which there is another webpage

my code

<iframe id="myiframe" src="http://bing.com" width="800" height="500"></iframe>

I want to open the webpage in the iframe using an proxy ip like ip:port method is that possible

Because it provides different data for different country ip i.e) Indian ip data is different from US ip data or some is blocking Indian ip is that possible

Or is there a way to set proxy in IFrame

Thanks

2
  • Can`t you do it this way ?
    – MikeKlemin
    Apr 30, 2015 at 12:00
  • I want the proxy to be in ip:port model not like a domain name Apr 30, 2015 at 12:12

2 Answers 2

4

If you have a proxy server in the US for domain1.com and your site is located on domain2.com, maybe could you do something as follows:

on domain1.com/page.html:

<iframe id="myiframe" src="http://bing.com" width="800" height="500"></iframe>

and on domain2.com:

<iframe id="myframe" src="http://domain1.com/page.html" width="800" height="500"></iframe>

It should then pull bing.com from the US proxy while still displaying it properly on your website.

You might want to add seamless and scrolling=no to your tag on domain1.com to prevent multiple scrollbars if you choose this method.

2
  • It wouldn't load it as an ip:port, but you can load it from a US server and then load it from your current server this way and it should still pull the data from the US request.
    – Michael d
    May 19, 2015 at 16:01
  • 3
    This will result in an iframe inside another iframe - but the browser making the request will all still be the same browser from the same country - and not the server located in the US Oct 27, 2016 at 10:41
1

This method is not the most safe method of using a proxy within an <iframe>. I don't know how safe this one is, but I would use this proxy: https://cors-anywhere.herokuapp.com/ If not this one, I would try Ultraviolet.

New contributor
gingerale20 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.