clipped from: blogoscoped.com   

Screen-scraping With PHP5


The simple but powerful function we need is called "loadHTMLFile" and accepts any URL as parameter.
Here's a sample of its usage, which will grab the Google News headlines and format them as simple linked HTML list: