Re: How do I get rid of the head garbage?
Wei Yuan (wyuan@leland.stanford.edu)
Fri, 1 Aug 1997 14:58:37 -0700 (PDT)
> From: Matt Weber <webernet@geocities.com>
> Date: Fri, 1 Aug 1997 09:51:19 -0400
>
> I have a search engine, and it uses LWP. I have it get the web page, store it as a string, then have the string converted to html. How do I get rid of the head garbage?
>
When you get the web page, save the content part of your response instead
of the whole thing.
$request = new HTTP::Request('GET', $url, $header);
$response = $ua->request($request);
$response_data = $response->content;
$data=$response_data.as_string;
--
#######################################################################
# Wei Yuan Email: wyuan@cs.stanford.edu #
# Teaching Assistant Office: Gates 130 (5-8782) #
# Computer Science Student Phone: 415-497-4260 #
# http://www-leland.stanford.edu/~wyuan/ #
#######################################################################