Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Perl proxy script
by jbrugger (Parson) on Apr 17, 2005 at 18:32 UTC
    Yes, mod_perl could help, but even better use mod_proxy. Why reinvent the wheel if it's alreaddy made?

    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Re: Perl proxy script
by EvdB (Deacon) on Apr 18, 2005 at 09:06 UTC
    As you are on a shared host it is unlikely that you'd be able to take advantage of mod_perl or mod_proxy as suggested.

    Take a look at LWP, specifically LWP::Simple. It should be easy to write a quick script something like this (not tested):

    #!/usr/bin/perl use strict; use warnings; use CGI; use LWP::Simple; my $url = CGI->param('url'); print CGI->header; print get( $url );
    which would be called using something like: http://your.host.com/the_script.pl?url=http://google.com. This is primitive but should work for very basic things.

    --tidiness is the memory loss of environmental mnemonics

Re: Perl proxy script
by merlyn (Sage) on Apr 18, 2005 at 12:49 UTC
    Ya'know, my spider sense is tingling on this one. I'm trying to think of legitimate reasons one would want a web proxy on a shared host, as a CGI script, especially one that supports https.

    I'm guessing that this is someone who wants to hide where they are coming from, for bad reasons, and isn't smart enough to know that there are already a few dozen means by which to do this already.

    I'd shy away from helping someone do bad things until we know better what the purpose of this action must be.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl proxy script
by gam3 (Curate) on Apr 17, 2005 at 17:30 UTC
    You can do it with mod_perl.
    -- gam3
    A picture is worth a thousand words, but takes 200K.
Re: Perl proxy script
by Anonymous Monk on Apr 17, 2005 at 16:39 UTC
    Probably there is some script (you should write one). Maybe it can work, it depends on your host.