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

Re: Need help with my code?

Thread Previous | Thread Next
March 16, 2001 11:09
Re: Need help with my code?
Message ID:
>>>>> "Cormac" == Cormac Garvey <> writes:

Cormac>   I have run into another problem, the page I retrieved uses FRAMES, so 
Cormac>   all I see is
Cormac>   <frame src="
Cormac> /ftgw/webxpress/account_listings/1BD900013E21"
Cormac> " name="body" marginwidth=0 marginheight=0 scrolling=auto>

Cormac> I am using libwww 5.50, how can I see file 
Cormac> "/ftgw/webxpress/account_listings/1BD900013E21" ?

You need to resolve that URL against the "base" URL of your response.
Luckily, $response->base contains that. :)  And the URI module
lets you hack a relative URL rather painlessly:

    my $new_url = URI->new_abs(
      "/ftgw/webxpress/account_listings/1BD900013E21", $response->base);

Then fetch $new_url.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<> <URL:>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See for onsite and open-enrollment Perl training!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About