"Philipp Traeder" <[EMAIL PROTECTED]> wrote in message...

> Hi Zeus,

Hello. Thanks for the quick reply.

> I guess LWP::UserAgent might be interesting in this context, but I
wouldn't
> try to parse the responses you get. Why don't you pass the resulting code
> through only?

I imagine the resulting code you're referring to is more than a server
response of 200, 400, etc. Right?

> Something like (not tested, pseudo code only):
>
> #!/usr/bin/perl -w
>
> use strict;
> use CGI;
> use LWP::UserAgent;
>
> # let's say your script is called like this:
> # http://mysite.com/relay.pl?url=http://www.disney.com
> my $query = new CGI();
> my $url_to_visit = $query->param('url');

Is $query used only to get the url parameter?

> my $ua = new LWP::UserAgent();
> # you should use something more general than "GET" here...don't know the
> # syntax OTTOMH
> my $response = $ua -> get($url_to_visit);
> print $response;

I would imagine I would have to interpret each web page click to determine
if a GET, POST, or running code is necessary.

> I'm not sure, but this sounds more or less like something I read in the
> documentation of mod_proxy - maybe you want to take a look at
>
>   http://httpd.apache.org/docs/mod/mod_proxy.html

Thanks. I will take a look.

> Without having thought about it too much, there might be some
security-related
> concerns you might want to think about - if you implement something like
this
> accessible to the public, you allow everybody to visit web pages in a way
> that it looks like you/your server did it. What if somebody uses your
"relay"
> server to download MP3s illegally?

This is not a web site I will advertise. I will allow only certain ip
addresses, so at most 5 people will use it. If they absuse it in any way, I
can just strangle them because I know them all.
>:-)

> Just my 5 cent,

Each cent counts. Very much appreciated.
-ZO



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to