tags:

views:

220

answers:

3

What I need to do is this:

<iframe src="http://www.google.com" width="800" height="600"></iframe>

But the constraint is, I want my website to fetch a requested website and display it in frame. That is, the clients browser must only have a connection with my web server. My website in turn will fetch requested url's and display them to the client.

The only way I have thought I could do this is perhaps passing the url to an application that in turn downloads the page and then redirects the clients browser to the page (now stored locally on my web server). The problem is however that this would only work with rather boring and static sites, I require the website in the website do be fully functioning, ie streaming video, secure connections...

What would be the best way to do this?

+5  A: 

I hate to break it to you, but I don't think there's a foolproof way to do this. What you're trying to do is make a proxy, and there's several ways to do it, but either way you won't be able to take things like Flash and JavaScript into account. I've used a lot of different proxies to get around the filter at my school and not one of them has been 100% effective. In fact, I don't think a single one has been able to load the music player on either PureVolume or MySpace.

If you still want to give it a try, read this article: Using Apache As A Proxy Server

musicfreak
+3  A: 

If one of your requirements is

... secure connections

that is not possible at all. By definition a secure end-to-end connections cannot go thru a proxy (see Man-in-the-middle)

PeterMmm
NAT defies that definition. I need to aswell
Trowalts
NAT blindly relays traffic - it can't see the contents of the traffic.
Sean McSomething
+1  A: 

I have found a solution, to who ever mentioned it and then deleted their answer, thanks.

Making use of a reverse proxy could do this, http://docsrv.sco.com/INT_Proxy/revpxy.htm shows some ways in which a reverse proxy may be used.

Paramesh Gunasekaran wrote a tutorial on creating your own reverse proxy with code supplied. http://www.codeproject.com/KB/IP/reverseproxy.aspx

Trowalts