develooper Front page | perl.libwww | Postings from October 2001

Re: Load another site while at some other site

Thread Previous
From:
Edward Moon
Date:
October 10, 2001 23:26
Subject:
Re: Load another site while at some other site
Message ID:
Pine.LNX.4.33.0110102323330.17653-100000@gate.mooned.org
Try and see what $response->content contains.

There are some other alternatives:
1) Is there a reason why you can't just provide a link or do a redirect to
the originating webserver?

2) If you are using Apache, please look into mod_proxy and mod_rewrite.
You can easily stick all or part of another website into your document
tree with these modules.

On Wed, 10 Oct 2001, Ritesh Gupta wrote:

> Hi All,
>
> I am trying to visit one page that should in turn pull contents from
> another page and display it, and be transparent to the user.
>
> So, e.g. when I goto http://internal.domain/cgi-bin/guessthis.cgi
> It should pull the contents of
> http://internal.domain/somedir/intrest.html and display it.
>
> I am new to using libwww.
>
> Here is the code excerpt that I have till now from all the cues I
> have. Please help me on how to display go forward on this:
>
> guessthis.cgi:
> ----------------------------
> use HTTP::Request ;
> use LWP::UserAgent;
>
> $ua = LWP::UserAgent->new;
> $request = HTTP::Request->new(GET =>
> 'http://someweb.domain/intrest.html');
> $response = $ua->request($request);
> ----------------------------
>
> Any help with this will be highly appreciated
> Thanks
> Ritesh
>


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About