Search code examples
htmliframeproxy

Proxy in html page


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


Solution

  • 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.