Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting LWP's get $url to text instead of HTML

Status
Not open for further replies.

ajmcello

Technical User
Apr 20, 2010
7
US

I was able to do something like:

$content = parse_html( get $url)->format;

which converts the HTML to text. This works great, but when running in a loop, parse_html crashes my machine because it runs out of memory!

Anybody know how I can fix this, or is there a better way to convert HTML to text without using parse_html?

Thanks
 
Need to see more of what you have put together, so far. Nothing in that one line that looks suspect.


'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
It seems to be a problem with LWP, or the way I'm using LWP. If I create a loop where I'm pulling a URL's content into an array, it will continually eat up more and more memory each and every time. I'll post the code in a bit...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top