perl/python "passthrough" script?

BeeGood

Junior Member
Jun 28, 2005
4
0
0
Anyone seen a script in perl/python that will accept a hit from a browser, get a page from a different site, and pass it back to the requesting browser?

For example, if I have the script on a site http://www.mysite.com and set it to translate to get pages from Yahoo, then if I put into my browser http://www.mysite.com/myscript.pl?index.html, the script will go get http://www.yahoo.com/index.html and send it back to my browser.

Thanks for any help! I'm sure that is easy to write in those languages; but I'm new to them and not quite up to it yet.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
You're right, it would be pretty easy and no, I don't have one off the top of my head :p but I'm curious as to how useful this would be. The images would be highly unlikely to show up properly unless you parsed the page first and fixed any relative urls. The same would go for links.

Depending on what you're trying to do, alternatives could be to redirect the browser to the yahoo page or put the yahoo page in a frame (kinda ugly but again, depends on what you're doing).
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
It sounds like what you're really after is a web proxy. I don't think any script is going to do a great job of it. It would be easy enough to grab the page, but you'd still have to sort through all the links for images and such and modify those. And then stuff like javascript, POST/GET, and flash would make it even worse. It would be very easy to write a trivial, crappy version of such a script, and very, very difficult to write a halfway competent one.